CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to compile a new drag force in Lagrangian model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2016, 08:05
Question 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: 10
lilinmin is on a distinguished road
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
lilinmin is offline   Reply With Quote

Old   May 31, 2016, 08:56
Default
  #2
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10
elmo555 is on a distinguished road
Hey,

can you be a bit more specific? Which solver are you using, and how did you add the new drag model?
elmo555 is offline   Reply With Quote

Old   May 31, 2016, 09:40
Default
  #3
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Quote:
Originally Posted by elmo555 View Post
Hey,

can you be a bit more specific? Which solver are you using, and how did you add the new drag model?
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?
lilinmin is offline   Reply With Quote

Old   May 31, 2016, 10:07
Default
  #4
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10
elmo555 is on a distinguished road
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.
elmo555 is offline   Reply With Quote

Old   June 9, 2016, 04:15
Default
  #5
Member
 
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 11
a.weber is on a distinguished road
BTW: The force model list is found in intermediate/parcels/include/MakeParcelForces.C
This is where you have to add it.

regards
Andreas
a.weber is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 11:12
FLUENT: how to record drag force at every time step? qiulan FLUENT 4 March 20, 2017 21:22
Compute drag force on a mesh (complete beginner!) matteo.monti Main CFD Forum 0 October 10, 2014 20:07
Stability problem due to turbulent dispersion force in a subcooled boiling model Edy OpenFOAM 7 August 10, 2011 12:00
Please help a newbie find the drag on a 3d model David Amer Main CFD Forum 1 March 6, 2002 03:33


All times are GMT -4. The time now is 19:32.