|
[Sponsors] |
How to compile a new drag force in Lagrangian model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 31, 2016, 09:05 |
How to compile a new drag force in Lagrangian model
|
#1 |
New Member
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 11 |
Dear Foamers,
I am now working with the gas-particle simulation. I have added a new drag model in the Drag file as the same way as other drag forces. But a don't know how to compile it. Can anyone help me ? Thank you very much in advance. Linmin |
|
May 31, 2016, 09:56 |
|
#2 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
Hey,
can you be a bit more specific? Which solver are you using, and how did you add the new drag model? |
|
May 31, 2016, 10:40 |
|
#3 |
New Member
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 11 |
Thank you very much for reply and I am sorry for that. I copied a file of the existed drag model in the file "src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag" and changed the code. Can it been compiled?
|
|
May 31, 2016, 11:07 |
|
#4 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
Well, you need to re-compile the solver you're using, and you shouldn't modify the original OF solver. There are many tutorials out there explaining how to create a new solver based on an exisiting one, e.g. here.
Basically: copy the original code to your working folder, adjust the name and EXE path, and add your drag model (using #include) where all the other drag models are included. Then compile the solver and you should be able to use your drag model. |
|
June 9, 2016, 05:15 |
|
#5 |
Member
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 12 |
BTW: The force model list is found in intermediate/parcels/include/MakeParcelForces.C
This is where you have to add it. regards Andreas |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 12:12 |
FLUENT: how to record drag force at every time step? | qiulan | FLUENT | 4 | March 20, 2017 22:22 |
Compute drag force on a mesh (complete beginner!) | matteo.monti | Main CFD Forum | 0 | October 10, 2014 21:07 |
Stability problem due to turbulent dispersion force in a subcooled boiling model | Edy | OpenFOAM | 7 | August 10, 2011 13:00 |
Please help a newbie find the drag on a 3d model | David Amer | Main CFD Forum | 1 | March 6, 2002 04:33 |