CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Setting up functions for OF (https://www.cfd-online.com/Forums/openfoam-pre-processing/188499-setting-up-functions.html)

joneill053 May 31, 2017 12:40

Setting up functions for OF
 
Hi all,

I am relatively new to OF (only been working with it about a month or so).

I am trying to properly set up my controldict file so that I can get out lift, drag, and moment coefficients out of a flat plate simulation. Below is the set-up for how I've gone about putting in the functions.

functions

{
forceCoeffs
{
type forceCoeffs;
writeControl timeStep;
writeInterval 10;
libs ("libforces.so");
patches (fixedWall);
rho rhoInf;
rhoInf 1.225;
log yes;
dragDir (1 0 0);
liftDir (0 0 1);
magUInf 1.0;
Aref 0.65;

}
}

Whenever I try to run a simulation either through HELYX-OS or the OF terminal window, my controldict file revers back to simply having its base inclusions such as setting start and end times etc.

Does anyone know why my controldict file would revert to its original state during a run? I know it's likely a simple question/simple answer kind of thing but any help at all would be much appreciated!

Thanks,

Joe

piu58 May 31, 2017 14:36

Do I understand that right, your controlDict is changed by the simulation?!?

OF only reads that file and does not change it. The only reason I see is taht there is some kind of preprocessing active. Which solver do you use?
Look after it with
Code:

which <mysolver>
and look wheter you call the real solver or some kind of script.


All times are GMT -4. The time now is 15:48.