|
[Sponsors] |
April 26, 2021, 09:55 |
How to add particle forces in user lib?
|
#1 |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
I created a new particle force which it's in
Code:
src/lagrangian/intermediate/submodels/Kinematic/ParticleForces Code:
src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H Here's my question: is there any way to do this externally. In some scenarios, for example HPC, I don't have write permission to the system version and have to compile my own OpenFOAM in order to add particle forces. |
|
May 5, 2021, 07:16 |
|
#2 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
Yes, it is quite forward. Define your force as you did in a new folder and create a novel makeNovelThermoParcelForces.H and only include your new force in that header. Use a different name for the macro, since it is already defined in the makeThermoParcelForces.H. Finally, you need to create a new file, for instance makeNovelThermoParcelSubmodels.C:
Code:
#include "basicThermoCloud.H" #include "makeNovelThermoParcelForces.H" makeNovelThermoParcelForces(basicThermoCloud); // name of the macro defined in makeNovelThermoParcelForces.H Good luck. RP |
|
June 14, 2022, 13:12 |
|
#3 | |
Member
Join Date: Jun 2016
Posts: 99
Rep Power: 9 |
Quote:
Sorry I forgot about this problem when I was thinking about it. Now I really need to implement it and I followed your instructions. However my particle force is not available in the hash table. Would you mind provide a minimum working example? Thanks. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The CoP Does not exist: Validating Aerodynamic forces through a "line of action" | ds4719 | Main CFD Forum | 14 | February 18, 2022 18:05 |
Is it able to use utility to output particle forces during timestep? | zhangxc0223 | OpenFOAM Running, Solving & CFD | 1 | April 30, 2020 03:30 |
Particle Forces in LPT using MPPICFoam | saiguruprasad | OpenFOAM Post-Processing | 0 | January 2, 2020 06:17 |
add user scalar in one phase | zhu | CFX | 0 | April 27, 2002 03:45 |
add user scalar and modify pressure | btzhu | CFX | 0 | April 11, 2002 22:09 |