|
[Sponsors] |
Write drag coefficient out from the drag model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 2, 2023, 01:44 |
Write drag coefficient out from the drag model
|
#1 |
New Member
ZP zhao
Join Date: Oct 2023
Location: China
Posts: 7
Rep Power: 3 |
Hello, everyone!
I wrote a drag model, and i want to write the calculated coefficient to the file like the velocity or pressure file does. So I wrote down: Code:
volScalarField KD ( IOobject ( "KD", mesh.time().timeName(), mesh, IOobject::NO_READ, IOobject::MUST_WRITE ), mesh, dimensionedScalar("zero",dimDensity*dimLength*dimVelocity/dimArea,0.0), relativeHeight_.boundaryField().types() ); |
|
November 3, 2023, 12:18 |
|
#2 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8 |
Hi ZX-zha,
I think you should give us more information about your procedures!!! Make it more clear. |
|
November 5, 2023, 05:53 |
|
#3 |
New Member
ZP zhao
Join Date: Oct 2023
Location: China
Posts: 7
Rep Power: 3 |
Hello, saeed jamshidi:
More specifically, I want to export the drag coefficient to a file in each time step like the ordinary variables p or U. But i don't know how to get the drag coefficient in the program. Can anyone help me? |
|
November 5, 2023, 06:12 |
|
#4 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8 |
simply add the attached file into your system folder, and call it in controlDict/function as below:
Code:
functions { #include "forceCoeffs" } next, adapt contents of the forceCoeffs based on your problem. this will create postprocess folder, which contains drag and lift data. If you have any further question, please let me know. Best, Saeed |
|
November 6, 2023, 01:43 |
|
#5 |
New Member
ZP zhao
Join Date: Oct 2023
Location: China
Posts: 7
Rep Power: 3 |
Thank you very much for your advice. That helped a lot.
|
|
Tags |
output |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
Overflow Error in Multiphase Modelling with Two Continuous Fluids | ashtonJ | CFX | 6 | August 11, 2014 15:32 |
problem with saving drag coefficient | colopolo | FLUENT | 5 | April 12, 2013 11:59 |
Drag coefficient for parcels in dieselFoam | sebastian_vogl | OpenFOAM Running, Solving & CFD | 5 | December 31, 2008 13:19 |
Automotive test case | vinz | OpenFOAM Running, Solving & CFD | 98 | October 27, 2008 09:43 |