Hi,
I am looking for a way to write particle-fluid interaction force of specific particle to a file. Normally I use Fix/print to output other information of atoms such as id,x,y,z or fx,fy,fz by pre-defining variables. However for dragforce, I am confused how to define variable for it.
For example one of my trials and it was failed below.
variable ID equal f_dragforce1[id_of_particle]
The structure of dragforce array might not be the same as those of normal force, fx,fy,fz in which we can point, e.g, fx[id_of_particle].
Could anyone tell me how to export the f_dragforce of particle to an external file?
Refer to a discussion by Christoph, dragforce is the total components of fluid force. Where can I edit to export individual components of dragforce?
Many thanks,
Regards,
Nathan,
richti83 | Fri, 04/10/2015 - 10:58
look in class FixCfdCouplingForce
I assume you are talking about fix_cfd_coupling_force (aka couple/cfd/dragforce or couple/cfd/force which referes to the same class).
1st: yes f_{couple/cfd/dragforce}[1..3] only exports the sum over all dragforces (can be seen in FixCfdCouplingForce::compute_vector),
but fortunately the fix couple itself creates another fix of type property/atom called dragforce (can be seen in FixCfdCouplingForce::post_create() ).
Now you can access this "hidden" fix for example with dump dd all custom x y z f_dragforce[1..3]
When you are interested in a single particle's dragforce create a group tmp id==1234 and apply the dump only to this group (will be filtered in dumpstyle itself). After that you can easily postprozess this dumpfiles in PV using plot-selection over time or any other tool.
Atom properties can not be easily transfered to variables afaik, all variable types which represent atom quantities are special function hardcoded in variable.cpp.
NTT1508 | Sun, 04/12/2015 - 13:42
Individual components of dragforce
Hi Christian,
Thank for your suggestion. That means currently it not able to print drag force directly to a file? Anyway your idea to extract properties of atom by group on PV is also helpful. Possibly it requires to edit something in CFD framework to output dragforce individually.
Have a good week.
Regards,
ckloss | Mon, 04/13/2015 - 11:37
Hi Nathan,
Hi Nathan,
as Christian outlined above, you can access the drag force of single particles by accessing f_dragforce via the variable command.
However, there is currently no out-of-the-box way to split the output into several forces coming from CFD (e.g. pressure force, drag force,...)
Best wishes
Christoph