Buoyancy force error

Submitted by tangl on Thu, 02/28/2019 - 13:08

Hi,

I used CMake to built an executable for Windows and it worked fine. I needed to do a few modifications to the source code.

1) I changed the fix_addforce.cpp file so that the radius of the particle and the fluid density were taken into account for the force with upward vertical direction. See line 259 and line 299 in the fix_addforce.cpp file attached.

2) I changed the fix_viscous.cpp to modify the drag force for a Bingham fluid. See line 71-84, line 107-110 and line 166-215 in the fix_viscous.cpp file attached.

After that I used CMake again to built again an executable and that worked fine again. When I run my input file the input for the drag force (line 98 in the input file BetonRVE_v1_2019 attached) which I modified is taken into account correctly when I check the log.liggghts file while first the input was not recognized by the default liggghts executable. If I change the variables for the buoyancy force or the drag force (and keep the rest of the input file the same), this is not changing my packing geometry but I get the same packing geometry every time. For the default liggghts executable I also run the same input file with different values for the buoyancy force which resulted in different packing geometries.

It seems that's something is not going correctly after modifying the addforce.cpp and fix_viscous.cpp files but I cannot find what the problem is.

Hopefully someone can have a look at my files and see where I made a mistake. Thanks in advance!

Regards,
Lisa

AttachmentSize
Binary Data Modified .cpp files and input file28.5 KB

tangl | Mon, 03/04/2019 - 12:27

Hi,

Can someone please have a look at the issue above?

Regards,
Lisa

tangl | Tue, 03/05/2019 - 14:29

The issue is solved. After carefully going through my files again, I saw that I made a mistake in the fix_viscous.cpp file in the equation of the drag force for a Bingham fluid. Furthermore, the default input I used for the fluid density was too small for the modified buoyancy force in fix_addforce.cpp to change the packing geometry.