Limiting values inside volScalarField
Hi all,
I am implementing passive scalar transport to dynamic Smagorinsky model, and I have run into trouble. In order to keep my solver steady I need to clip the insane values of turbulent Prandtl numbers, that are inevitable at least with the Lilly formulation. To that end I wrote the following. Code:
void PrtLimiter(volScalarField& Prt) Code:
volScalarField Tmp = cD(D)*cPrt(D); Code:
myChannelFoam2: symbol lookup error: .../lib/linux64GccDPOpt/libHTdynamicSmagorinskyModel.so: undefined symbol: _ZN4Foam14incompressible9LESModels20HTdynamicSmagorinsky10PrtLimiterERNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEE To those who are interested in the model, I did some modifications to avoid doing division with very small numbers that's why the constants are multiplied, not divided, and a 1/2 is missing. -Pekka |
Hi Pekka
It sounds like PrtLimiter is a method of some object, so in your C-file, is should read Code:
void <nameOfMyObject>::PtrLimiter(scalarField & Prt) Niels |
Hi!
I think you can use the .max() and .min() fonction of a volScalarField: Code:
Prt.max(Low) Cyp |
Thanks
Thank you both,
Niels was right and with the input from Cyp I don't even need the function. I tested it already and it works beautifully. Thanks again, -Pekka |
All times are GMT -4. The time now is 22:02. |