nufeb / NUFEB

Official release of the NUFEB software
http://research.ncl.ac.uk/nufeb/
GNU General Public License v3.0
18 stars 16 forks source link

How to alter gravity factor? #11

Open aorourke123 opened 3 years ago

aorourke123 commented 3 years ago

Hi, can you provide details on where gravity is factored into the program? Can this force be altered within LAMMPs or at fixes within NuFEB?

Thank you, Aubrie

shelllbw commented 3 years ago

Hi Aubrie, gravity is one of the LAMMPS' features. Though we didn't consider the force in any example in /examples/, you can easily introduce to your model by adding "fix gravity" command in the inputscript, like: fix f_g all gravity 1.0 spherical 0.0 -180.0 You can alter magnitude and direction of the force from the command. More details can be found here: https://lammps.sandia.gov/doc/fix_gravity.html

Bowen

aorourke123 commented 3 years ago

Thank you. What level of gravity does NuFEB assume? From the above, it seems that NuFEB does not factor in gravity? I am interested to model microgravity on bacterial biofilms. If I go into the LAMMPS code that is part of the NuFEB package, can I make this parameter change without disrupting any other NuFEB dependencies on LAMMPS?

Thank you!

shelllbw commented 3 years ago

What parameter you'd like to change? You can define any level and direction of gravity in the inputscript without touching code (unless you plan to implement a new force calculation). What you can do is, for example: add the line fix f_g all gravity 9.8 spherical 0.0 -180.0 in the "#Define DEM Variables&Commands" section of examples/biofilm-het/Inputscript-vtk.lammps file. This will impose a gravity force in -z direction with acceleration = 9.8 ms-2 to each atom in the biofilm model. You will see a different biofilm morphology if running the simulation. You can alter the magnitude by changing 9.8 to any other value, you can also change the force direction by altering the last two parameters.

aorourke123 commented 3 years ago

That should do it!

Thanks for the details! Aubrie

On Wed, Jan 27, 2021 at 2:00 PM Bowen Li notifications@github.com wrote:

What parameter you'd like to change? You can define any level and direction of gravity in the inputscript without touching code (unless you plan to implement a new force calculation). What you can do is, for example: add the line fix f_g all gravity 9.8 spherical 0.0 -180.0 in the "#Define DEM Variables&Commands" section of examples/biofilm-het/Inputscript-vtk.lammps file. This will impose a gravity force in -z direction with acceleration = 9.8 ms-2 to each atom in the biofilm model. You will see a different biofilm morphology if running the simulation. You can alter the magnitude by changing 9.8 to any other value, you can also change the force direction by altering the last two parameters.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nufeb/NUFEB/issues/11#issuecomment-768502171, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASTM5PPWJ3OOVCL37TBRGLDS4BPC7ANCNFSM4WVNH3DQ .