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

LES correct function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2004, 22:14
Default Dear Sirs, I am trying to f
  #1
luiz eduardo
Guest
 
Posts: n/a
Dear Sirs,
I am trying to find where "correct" member is defined so as to be able to implement a new LES model. (this function correct is used aparently for updating turbulent nu, B, etc.). I could find it in the LES models themselves, but it always comes to a point that I get a variable of type volScalarField (for instance delta_) accessing this member (correct). But I could not find it in GeometricFields.H, GeometricScalarFields.H, or anything similar.
When I call delta_.correct, am I correcting SGS quantities, like in the LES models? Or it is for something else

I think I am a little lost, still struggling with C++. Or pehaps I need some sleep...

I beg your patience...

Luiz
  Reply With Quote

Old   March 24, 2004, 03:09
Default Yes the LES model correct func
  #2
Henry Weller (Henry)
Guest
 
Posts: n/a
Yes the LES model correct function is indeed in the LES models, for example in the compressible LES models in version 2.3 I am working on:

dm(208) pwd
/home/dm2/henry/foam/foam2.3/src/LESmodels/compressible/lnInclude
dm(209) !gr
grep correct *
DeardorffDiffStress.C:void DeardorffDiffStress::correct(const tmp& tgradU)
DeardorffDiffStress.C: GenSGSStress::correct(gradU);
DeardorffDiffStress.C: muSgs_.correctBoundaryConditions();
DeardorffDiffStress.H: void correct(const tmp& gradU);
dynOneEqEddy.C:void dynOneEqEddy::correct(const tmp& tgradU)
dynOneEqEddy.C: GenEddyVisc::correct(gradU);
dynOneEqEddy.C: muSgs_.correctBoundaryConditions();
dynOneEqEddy.H: void correct(const tmp& gradU);
GenEddyVisc.C:void GenEddyVisc::correct(const tmp& gradU)
GenEddyVisc.C: LESmodel::correct(gradU);
GenEddyVisc.H: virtual void correct(const tmp& gradU);
GenSGSStress.C:void GenSGSStress::correct(const tmp& gradU)
GenSGSStress.C: LESmodel::correct(gradU);
GenSGSStress.H: virtual void correct(const tmp& gradU);
LESmodel.C:void LESmodel::correct(const tmp&)
LESmodel.C: delta_().correct();
LESmodel.C:void LESmodel::correct()
LESmodel.C: correct(fvc::grad(U_));
LESmodel.H: // This calls correct(const tmp& gradU) by supplying
LESmodel.H: void correct();
LESmodel.H: virtual void correct(const tmp& gradU);
lowReOneEqEddy.C:void lowReOneEqEddy::correct(const tmp& tgradU)
lowReOneEqEddy.C: GenEddyVisc::correct(gradU);
lowReOneEqEddy.C: // low Re no corrected eddy viscosity
lowReOneEqEddy.C: muSgs_.correctBoundaryConditions();
lowReOneEqEddy.H: void correct(const tmp& gradU);
oneEqEddy.C:void oneEqEddy::correct(const tmp& tgradU)
oneEqEddy.C: GenEddyVisc::correct(gradU);
oneEqEddy.C: muSgs_.correctBoundaryConditions();
oneEqEddy.H: void correct(const tmp& gradU);
Smagorinsky.C:void Smagorinsky::correct(const tmp& gradU)
Smagorinsky.C: GenEddyVisc::correct(gradU);
Smagorinsky.C: muSgs_.correctBoundaryConditions();
Smagorinsky.H: void correct(const tmp& gradU);
dm(210)
  Reply With Quote

Old   March 24, 2004, 06:59
Default Yes, but where can I find the
  #3
luiz eduardo
Guest
 
Posts: n/a
Yes, but where can I find the "correct" function definition?
In all of those files.H, for instance, isoLESmodel, the function is referenced by something like

void isoLESmodel::correct(const tmp&)
{
delta_().correct();
}


void isoLESmodel::correct()
{
correct(fvc::grad(U_));
}

The second one ends up in the LES model itself (like isoSmagorinsky). So that I can understand.

But what about the first one (delta_.correct)? Is it for the same purpose? (Correcting SGS wuantities)
Where is its definition? I expected it to be in GeometricField.C or similar... but I dont think it is.

Best Regards,
Luiz
  Reply With Quote

Old   March 24, 2004, 07:03
Default > Yes, but where can I find t
  #4
Henry Weller (Henry)
Guest
 
Posts: n/a
> Yes, but where can I find the "correct" function definition?

In the corresponding .C file.

> But what about the first one (delta_.correct)?

delta_ is not an LES model it is the LES delta. If you want to change the way the delta is calculated rather than the LES model you will have to look in the LESdeltas library.
  Reply With Quote

Old   March 24, 2004, 10:03
Default The only thing I found there
  #5
luiz eduardo
Guest
 
Posts: n/a
The only thing I found there was

virtual void correct() = 0;

(in LESdelta.H file)

But I assume there must be any place else where it is calculated rather than just zeroed. If so, could you please tell me the file?

What is the purpose of it? Correct what?

Thanks again,
Luiz
  Reply With Quote

Old   March 24, 2004, 10:10
Default There are lots of implemented
  #6
Henry Weller (Henry)
Guest
 
Posts: n/a
There are lots of implemented correct functions for the LES deltas, all you have to do is:

dm(215) pwd
/home/dm2/henry/foam/foam2.2/src/LESmodels/LESdeltas/lnInclude
dm(216) grep correct *
cubeRootVolDelta.C:void cubeRootVolDelta::correct()
cubeRootVolDelta.H: void correct();
LESdelta.H: virtual void correct() = 0;
PrandtlDelta.C:void PrandtlDelta::correct()
PrandtlDelta.C: geometricDelta_().correct();
PrandtlDelta.H: void correct();
smoothDelta.C:void smoothDelta::correct()
smoothDelta.C: geometricDelta_().correct();
smoothDelta.H: void correct();

virtual void correct() = 0;

Is in the abstract base class (and doesn't "zero" anything) and clearly isn't implemented. If you want to see what the implementations do you will have to look at one of the derived classes rather than the abstract base class. However, my understanding is that you want to implement an LES model not and LES delta so you are probably looking in the wrong library.
  Reply With Quote

Old   September 14, 2007, 04:10
Default Dear sir, I'm working with
  #7
New Member
 
gianpaolo gallo
Join Date: Mar 2009
Posts: 3
Rep Power: 17
ginapaolo is on a distinguished road
Dear sir,

I'm working with a engine solver and I am trying to find exactly how the function correct(), in the hhuCombustionthermo and hhuMixtureThermo, updates the field (h,rho,etc..), because I need to change the way these are changed.

The Foam version I'm using is the 1.3.

Could you help me, please?

I beg your patience.

Thanks

Gianpaolo
ginapaolo 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
can any one correct this(udf) solomon FLUENT 5 December 5, 2007 01:24
How the function correct updates the fields ginapaolo OpenFOAM 0 September 13, 2007 08:03
Is this correct? Siva FLUENT 3 August 14, 2007 08:35
Wall Function - Correct me if I am wrong Danny Tandra Main CFD Forum 10 July 16, 2003 13:26
Is this UDF correct? JJ FLUENT 3 April 8, 2001 18:54


All times are GMT -4. The time now is 13:28.