CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   problems with a DES (k-epsilon model) implementation (http://www.cfd-online.com/Forums/openfoam-solving/63388-problems-des-k-epsilon-model-implementation.html)

sven82 April 7, 2009 04:12

problems with a DES (k-epsilon model) implementation
 
Hi everyone,

at the moment I will try to implementation the k-eps model in a DES .

The base of code are the DES SpalartA, white the two new components k and epsilon.

my epsilon (Ldes) is defined as :

if (mesh_.changing())
{
epsilon_ =
pow(k_,(3/2))/min(CDES_*delta(),pow(k_,3/2))/epsilon_);
}

as next I add the two equations

tmp<fvScalarMatrix> epsEqn
(
fvm::ddt(epsilon_)
+ fvm::div(phi_, epsilon_)
- fvm::Sp(fvc::div(phi_), epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_)
==
C1_*G*epsilon_/k_
- fvm::Sp(C2_*epsilon_/k_, epsilon_)
);


and

tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ fvm::div(phi_, k_)
- fvm::Sp(fvc::div(phi_), k_)
- fvm::laplacian(DkEff(), k_)
==
G
- fvm::Sp(epsilon_/k_, k_)
);

Now the problem with the case, after a successful wmake libso compilation,
its not possible to run the code. :confused:

After the start with oodles, its occurs this error messages

Courant Number mean: 0 max: 0.00126355
#0 Foam::error::printStack(Foam::Ostream&) in "/usrfem/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usrfem/femsys_local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib64/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/usrfem/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usrfem/femsys_local/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libincompressibleLESModels.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usrfem/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libincompressibleLESModels.so"
#6 Foam::incompressible::LESModels::kEpsilon::correct (Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::fvPatchField, Foam::volMesh> > const&) in "/usrfem/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libincompressibleLESModels.so"
#7 Foam::incompressible::LESModel::correct() in "/usrfem/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libincompressibleLESModels.so"
#8 main in "/usrfem/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/oodles"
#9 __libc_start_main in "/lib64/libc.so.6"
#10 Foam::regIOobject::readIfModified() in "/usrfem/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/oodles"
Floating exception


I hope I get some tips with this message or any helps how they test the turbulence model of errors



best regards
Sven










mattijs April 8, 2009 03:13

without knowing anything about your model:

http://openfoamwiki.net/index.php/HowTo_debugging

sven82 April 14, 2009 07:53

hi mattijs,

thanks for the link,
now its works fine :)

sven

lakeat April 14, 2009 08:41

Hi, sven!

I'm very interested in your implementation, what's going on and which testCase do you use?

Regards,
Daniel

sven82 April 14, 2009 10:08

Hi Daniel,

before I start with some test case, I will try to implantation a flux blending between CDF and upwind.

In my opinion is the best test case cube with 3 cyclic patches in three mesh sizes with the target to compare the isotropic turbulence.
After this I will try a practice case like mirror of a car, something like this.

But the next step is the flux blending........... :confused:

Sven

braennstroem April 18, 2009 06:00

Hi Sven,

did you take a look at localBlended scheme? It should be suitable for this case.

Fabian

sven82 April 21, 2009 10:31

Hi braennstroem ,

the idea with the localblended sounds good and its definitely the simplest way for me,
thanks for that!

Sven

lakeat April 30, 2009 07:32

Hi Sven,

How's it going?
I saw you have added the new L_DES scale, what is your reference papers, can you email me a copy of them? EMail: LAKEAT AT GMAIL DOT COM

Quote:

Originally Posted by sven82 (Post 212843)
before I start with some test case, I will try to implantation a flux blending between CDF and upwind.

As I remember, it seems they (the Desider community) used to use different schemes in RANS region and LES region, is this what you are trying to do?

Thank you!
Daniel

sven82 May 4, 2009 11:04

hi lakeat,

thats exactly what I try do.

based of a empirical function like this

http://www.bilder-space.de/thumb/04....pbNUDelLok.gif

will I switch or mix the both schemes (upwind / central) !

http://www.bilder-space.de/show.php?...wVYUyLYjlk.gif(sorry for the bad picture ! klick to enlarge)

[TARVIN SHUR STRELETS SPALART (2002) Upgrades in the DES of complex turb. flow]
www.springerlink.com/index/m516557444083t38.pdf

when everything got a god idea for the implementation of the procedure or a similary example please post that here.

thx
Sven

sven82 May 4, 2009 11:09

Hi braennstroem ,

the idea with the localblended sounds good and its definitely the simplest way for me,
thanks for that!

Sven

sven82 May 4, 2009 11:13

hi lakeat,

thats exactly what I try do.

based of a empirical function like this

http://www.cfd-online.com/Forums/%5B...G%5D%5B/URL%5Dhttp://www.bilder-space.de/thumb/04....8BERZAL2C5.gif

will I switch or mix the both schemes (upwind / central) !

(sorry for the bad picture ! klick to enlarge)

[TARVIN SHUR STRELETS SPALART (2002) Upgrades in the DES of complex turb. flow]
www.springerlink.com/index/m516557444083t38.pdf

when everything got a god idea for the implementation of the procedure or a similary example please post that here.

thx
Sven

lakeat May 5, 2009 07:56

I cannot download it, it's not free for my university. Can you email me a copy, thanks a bunch.
And did you notice the S-A model differences between
  1. http://www.cfd-online.com/Wiki/Spalart-Allmaras_model
  2. Wilcox-Turbulence Modeling for CFD
  3. Implementation in OpenFOAM
  4. Original S-A, in 1994
  5. Version published by Niktin
I am using Niktin's version, but I'm Just curious, How did OpenFOAM's version come?

Have you tried IDDES, it seems the length scale has changed a lot.

About the mixture of two schemes, is it stable and is it very NECESSARY for the simulation? I doubt that. Any ideas?

philippebv May 15, 2009 12:42

Hi Daniel, Sven, Fabian and other DES players,

Your work on DES implementation is very interesting. I was wondering if any of you tried to implement a DES-SST model? The proposed model by Strelets et al (AIAA Paper 2001-0879) is interesting. There is also a "shielded" formulation for that model, similar the DDES implementation in the Spalart-Allamaras model. That latter DDES-SA model can easily be implemented from the DES-SA already available in OpenFOAM (Ask me if you want to test my DDES version), but I would very much like to test the DES-SST model but the programming effort is much bigger ;)

About the mix between upwind and central, I read a recent article from Bombardier aerospace (not available yet) where they use the parameter fd (from the Spalart-Allmaras DDES formulation) to blend the schemes. Maybe it would be something to consider since it does not require additional calculation in the model. fd=0 actually forces the RANS mode while fd=1 is equivalent to DES97, and most likely to LES mode. I will try to implement that blending in my DDES-SA model by looking at localBlended scheme as suggested by Fabian, but if you can provide further help for that it would be much appreciated.

Regards,

Philippe

lakeat May 15, 2009 22:03

Hi Philippe,

Good Morning from China!
1. DDES also includes a low Reynolds number correction, did you notice it?
2. IDDES is really a great idea, a very timely revision to DES concerning LLM. But I lose my idea now about the length scale redefinition, will the cube-root approach violate the IDDES spirit?
3. I'm shocked to find that ANSYS-12.0 has been released with DDES already in it, (even with a option based on SST), sigh... after all, it is Mr. Menter who is working for them with a high frequency activities with DESIDER. You know I once talked to my advisor, boasting that opensource like OpenFOAM is more up-to-date than commercial software, now I realize it is not so always, it depends.

Regards

braennstroem May 16, 2009 11:56

Hi Philippe,

you can try to add to 'createFields' file something like:

volScalarField localInterface= reinterpret_cast<Foam::incompressible::RASModels:: kOmegaSST_Y*>(turbulence.operator->())->HybInterface();

where HybInterface() is a public member function in your model (in this case "kOmegaSST_Y".

Before the calculation of the momentum equations you would calculate the surfaceScalarField:

Info << "Into UBlending" << endl;
surfaceScalarField surfLocalInterface = fvc::interpolate(localInterface);
surfaceScalarField UBlendingFactor ("UBlendingFactor",surfLocalInterface);

Fabian

philippebv May 19, 2009 09:43

Hi,

Daniel, I didn't know for CFX-12, it's interesting. I think will soon upgrade to CFX-12, so I might be able to test the DDES. But in my opinion, the DES-SST implemented in CFX-11 was already a DDES formulation.

Fabian, thanks for the answer, I'll look into that.

Are any of you going to be at the Workshop in Montreal?


All times are GMT -4. The time now is 01:41.