Finding moving equation of parcel in icoLagrangianFoam
Hi everyone,
I am a new foamer and I have a problem when adding electrical force in icoLagrangianFoam. It seems that there is no relation between void Foam::Cloud<ParticleType>::move(TrackingData& td) described in kinematicCloud.evolve() with moving equations of parcel. Could anyone help me find the class that contains equations of parcel. Thank you very much! |
Hi Truong.
Particle equations of motion are found in $FOAM_SRC/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C (at least for OpenFOAM 6 anyway). Then in there, there is a function Foam::KinematicParcel<ParcelType>::calcVelocity. This function calculates the velocity increment based on the explicit and implicit forces acting on the particle: Code:
// Shortcut splitting assuming no implicit non-coupled force ... Then the velocity increment is computed Code:
// Integrate to find the new parcel velocity There is a lot of templating, so it can take a while of following code to find where various properties are actually computed. |
Quote:
Code:
$FOAM_SRC/lagrangian/intermediate/submodels/Kinematic/ParticleForces So for your electrical force, you should probably begin by copying one of the classes in this directory that best matches what you want to, and modify it from there. |
Dear Josh Williams,
Thank you very much for your reply. You have provided me with valuable information. I am a new foamer so it is helpful for me If you guide me how the function calcVelocity() in KinematicParcel.C related to function move(TrackingData& td) in CloudTemplate.C Code:
void Foam::Cloud<ParticleType>::move(TrackingData& td) Code:
Info<< "Evolving kinematicCloud" << endl; I hope that you could clarify this problem for me. Thank you very much! |
Hi Truong,
I remember trying to find this myself a year ago roughly. I think the relationship between kinematicCloud and kinematicParcel classes are very heavily templated and abstracted so it is a bit tricky to understand. But, I would say if you are simply adding an electrical force, you do not need to worry about this. You just simply copy a particle force template and modify it for your electrical force, no? Best, Josh |
Hi Josh,
Thank you very much for your reply. I got the link between KinematicCloud and KinematicPacel as you instructed me. I have another problem and it is very kind if you could help me solve it. I want to modify the calcVelocity function in KinematicParcel.C because this function controls the particle motion in move() function of CloudTemplate.C. If you could remember this problem, please give me details for solving it. Thank you very much once more time! Best, Truong |
All times are GMT -4. The time now is 09:55. |