|
[Sponsors] |
August 23, 2007, 23:16 |
Hi, there:
I think I found
|
#1 |
Member
Ning Yang
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 84
Rep Power: 17 |
Hi, there:
I think I found a bug in liencubiclowRe model c file. The definition of nonlinearstress is as follows: ################################################# nonlinearStress ( "nonlinearStress", symm ( // quadratic terms pow(k_, 3.0)/sqr(epsilon_)* ( Ctau1/fEta* ( (gradU & gradU) + (gradU & gradU)().T() ) + Ctau2/fEta*(gradU & gradU.T()) + Ctau3/fEta*(gradU.T() & gradU) ) // cubic term C4 - 20.0*pow(k_, 4.0)/pow(epsilon_, 3.0)* pow(Cmu, 3.0)* ( ((gradU & gradU) & gradU.T()) + ((gradU & gradU.T()) & gradU.T()) - ((gradU.T() & gradU) & gradU) - ((gradU.T() & gradU.T()) & gradU) ) // cubic term C5, explicit part + min ( C5viscosity, dimensionedScalar("0", C5viscosity.dimensions(), 0.0) )*gradU ) ) ################################################# here is the definitio of the Reynolds Stress: ################################################# tmp<volsymmtensorfield> LienCubicKELowRe::R() const { return tmp<volsymmtensorfield> ( new volSymmTensorField ( IOobject ( "R", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), ((2.0/3.0)*I)*k_ - nut_*twoSymm(gradU) + nonlinearStress, k_.boundaryField().types() ) ); } ############################################### I think the correct definition should be: ((2.0/3.0)*I)*k_ - nut_*twoSymm(gradU) + nonlinearStress*fmu where fmu is the damping function. Reference: Lien, F.S., Chen, W.L., Leschziner, M.A., 1996. Low-Reynolds-number eddy-viscosity modeling based on non-linear stress-strain/vorticity relations. Engineering Turbulence Modelling and Experiments 3 (Edited by Rodi, W. and Bergeles, G.), 91-100. Elsevier Science Publishers. Etemad, S., et al., 2006. Turbulent flow and heat transfer in a square-sectioned U bend. Progress in compuational fluid dynamics 6, 89-100. |
|
August 24, 2007, 03:21 |
Do you think the nonlinearStre
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Do you think the nonlinearStress should also be multiplied by fMu in the other terms i.e. in LienCubicKELowRe::divR and G? If so it could simply be multiplied by fMu when it is calculated at the bottom of LienCubicKELowRe::correct().
|
|
August 28, 2007, 20:10 |
Hi Henry:
Thank you for you
|
#3 |
Member
Ning Yang
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 84
Rep Power: 17 |
Hi Henry:
Thank you for your help. There are several places I have to make changes. I modified nonlinearstress, fmu, nut, epsEqn, and lienleschzinerlowReSetWallDissipatoin.H file. Then I compiled the new lienleschzinerLowRe with the following make/files: turbulenceModel/turbulenceModel.C turbulenceModel/newTurbulenceModel.C laminar/laminar.C LienCubicKELowRe/LienCubicKELowRe.C wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField .C wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFv PatchScalarField.C wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWall FunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModels It turns out that I got errors as follows: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% : undefined reference to `Foam::fvPatchField<double>::dictionaryConstructor TablePtr_' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text+0x1): In function `__tcf_4': : undefined reference to `Foam::fvPatchField<double>::destroydictionaryCons tructorTables()' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text+0x11): In function `__tcf_3': : undefined reference to `Foam::fvPatchField<double>::destroypatchMapperCon structorTables()' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text+0x21): In function `__tcf_2': : undefined reference to `Foam::fvPatchField<double>::destroypatchConstruct orTables()' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m22fixedV alueFvPatchFieldIdE4typeEv[Foam::fixedValueFvPatchField<double>::type() const]+0x3): In function `Foam::fixedValueFvPatchField<double>::type() const': : undefined reference to `Foam::fixedValueFvPatchField<double>::typeName' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m22fixedV alueFvPatchFieldIdE22gradientBoundaryCoeffsEv[Foam::fixedValueFvPatchField<doubl e>::gradientBoundaryCoeffs() const]+0x19): In function `Foam::fixedValueFvPatchField<double>::gradientBou ndaryCoeffs() const': : undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m22fixedV alueFvPatchFieldIdE22gradientInternalCoeffsEv[Foam::fixedValueFvPatchField<doubl e>::gradientInternalCoeffs() const]+0xd): In function `Foam::fixedValueFvPatchField<double>::gradientInt ernalCoeffs() const': : undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m14object Registry12lookupObjectINS_14GeometricFieldIdNS_12f vPatchFieldENS_7volMeshEEEEERK T_RKNS_4wordE[Foam::GeometricField<double,> const& Foam::objectRegistry::lookupObject<foam::geometric field<double,> >(Foam::word const&) const]+0x125): In function `Foam::GeometricField<double,> const& Foam::objectRegistry::lookupObject<foam::geometric field<double,> >(Foam::word const&) const': : undefined reference to `Foam::GeometricField<double,>::typeName' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m14object Registry12lookupObjectINS_14GeometricFieldIdNS_12f vPatchFieldENS_7volMeshEEEEERK T_RKNS_4wordE[Foam::GeometricField<double,> const& Foam::objectRegistry::lookupObject<foam::geometric field<double,> >(Foam::word const&) const]+0x290): In function `Foam::GeometricField<double,> const& Foam::objectRegistry::lookupObject<foam::geometric field<double,> >(Foam::word const&) const': : undefined reference to `Foam::GeometricField<double,>::typeName' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m14object Registry12lookupObjectINS_14GeometricFieldINS_6Vec torIdEENS_12fvPatchFieldENS_7v olMeshEEEEERKT_RKNS_4wordE[Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x125): In function `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const': : undefined reference to `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' Make/linux64GccDPOpt/nutWallFunctionFvPatchScalarField.o(.text._ZNK4Foa m14object Registry12lookupObjectINS_14GeometricFieldINS_6Vec torIdEENS_12fvPatchFieldENS_7v olMeshEEEEERKT_RKNS_4wordE[Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x290): In function `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const': : undefined reference to `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x6bc): In function `Foam::turbulenceModels::nutStandardWallFunctionFv PatchScalarField::evaluate()': : undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x18e9): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructpatchConstru ctorTables()' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x1904): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::patchConstructorTable Ptr_' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x1922): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructpatchMapperC onstructorTables()' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x193d): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::patchMapperConstructo rTablePtr_' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x195b): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructdictionaryCo nstructorTables()' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x1973): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::dictionaryConstructor TablePtr_' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x1): In function `__tcf_4': : undefined reference to `Foam::fvPatchField<double>::destroydictionaryCons tructorTables()' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x11): In function `__tcf_3': : undefined reference to `Foam::fvPatchField<double>::destroypatchMapperCon structorTables()' Make/linux64GccDPOpt/nutStandardWallFunctionFvPatchScalarField.o(.text+ 0x21): In function `__tcf_2': : undefined reference to `Foam::fvPatchField<double>::destroypatchConstruct orTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x7c 9): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructpatchConstru ctorTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x7e 4): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::patchConstructorTable Ptr_' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x80 2): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructpatchMapperC onstructorTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x81 d): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::patchMapperConstructo rTablePtr_' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x83 b): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::constructdictionaryCo nstructorTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x85 3): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `Foam::fvPatchField<double>::dictionaryConstructor TablePtr_' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x14 3c): In function `Foam::turbulenceModels::nutStandardRoughWallFunct ionFvPatchScalarField::evaluat e()': : undefined reference to `Foam::fvPatch::deltaCoeffs() const' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x1) : In function `__tcf_4': : undefined reference to `Foam::fvPatchField<double>::destroydictionaryCons tructorTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x11 ): In function `__tcf_3': : undefined reference to `Foam::fvPatchField<double>::destroypatchMapperCon structorTables()' Make/linux64GccDPOpt/nutStandardRoughWallFunctionFvPatchScalarField.o(. text+0x21 ): In function `__tcf_2': : undefined reference to `Foam::fvPatchField<double>::destroypatchConstruct orTables()' collect2: ld returned 1 exit status make: *** [OpenFOAM.out] Error 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The weird thing is I got the same error even when I compiled other available turbulence models in the foam such as KE, LRR, etc. Do you have any suggestions? Ning |
|
August 28, 2007, 20:49 |
I had a similar post several d
|
#4 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
I had a similar post several days ago with no answer yet. I also tried to recompile the turbulence models again without making any change and received similar error message.
Ning, if you happen to solve this problem, could you please share this information with me? thanks a lot. Quinn |
|
August 29, 2007, 02:52 |
Which version of OpenFOAM are
|
#5 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Which version of OpenFOAM are you using?
Which compiler are you using? Have you compiled everything from sources? |
|
August 29, 2007, 03:48 |
I am using openfoam 1.4.1. wit
|
#6 |
Member
Ning Yang
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 84
Rep Power: 17 |
I am using openfoam 1.4.1. with Intel c++ compiler. And in the "files" file of "make" folder, I have:
================================================== = turbulenceModel/turbulenceModel.C turbulenceModel/newTurbulenceModel.C laminar/laminar.C LienCubicKELowRe/LienCubicKELowRe.C wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField .C wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFv PatchScalarField.C wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWall FunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModels ================================================= everything is compiled under /src/turbulenceModels/incompressible using wmake. I guess my question is if i have to recompile all the other turbulent models. Is there anything else I have to do? Thanks. Ning Ning |
|
August 29, 2007, 04:38 |
Did you compile the library us
|
#7 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Did you compile the library using wmake libso?
|
|
August 29, 2007, 09:25 |
Henry,
Thank you so much fo
|
#8 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Henry,
Thank you so much for your help. My problem is solved. I did not realize that there is some difference between compiling application and dynamic lib. |
|
August 30, 2007, 10:02 |
Henry:
It works fine now. T
|
#9 |
Member
Ning Yang
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 84
Rep Power: 17 |
Henry:
It works fine now. Thanks. One more thing: do you know the source paper of liencubiclowRe model in the foam? Ning |
|
August 30, 2007, 10:19 |
It was implemented as part of/
|
#10 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
It was implemented as part of/following a turbulence model assessment project involving Imperial College. I have an unpublished report containing the details of this and the other non-linear models somewhere which I can dig-up if it is important. I have not checked or even used the model in OpenFOAM and there may be errors in it or it may be that it is a correct implementation of the form published at the time and you are working from more recent documents.
Do you now have a form consistent with the publications you are working from? Can you send details of the changes you have made or better still post the new version? |
|
August 30, 2007, 11:09 |
I implemented two versions: hi
|
#11 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,906
Rep Power: 33 |
I implemented two versions: high-Re with wall functions and low-Re. Here are the references I've used:
@Article{Lien:CUBICKE, author = {Lien, F.S. and Leschziner, M.A.}, title = {Modelling 2D separation from a high lift airfoil with a non-linear eddy viscosity model and second moment closure}, journal = {Aeronautical Journal}, year = 1995, pages = {125-144} } @InProceedings{Lien:LOWRECUBICKE, author = {Lien, F.S. and Chen, W.L. and Leschziner, M.A.}, title = {Low-Reynolds-number eddy-viscosity modelling based on non-linear stress-strain-vorticity relations}, booktitle = {Proc. 3rd Symp. on Engineering Turbulence Modelling and Measurements}, year = 1996, address = {Crete, Greece}, month = {May} } Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 30, 2007, 15:19 |
The liencubiclowRe code in the
|
#12 |
Member
Ning Yang
Join Date: Mar 2009
Location: University Park, PA, USA
Posts: 84
Rep Power: 17 |
The liencubiclowRe code in the foam is different from lien's paper of Low-Reynolds-number eddy-viscosity modelling based on non-linear stress-strain-vorticity relations. Specifically, the differences are nonlinearstresses, fmu, the transport equation for epsilon, and wall dissipation. I changes the code and am testing the code now. If it works fine, I will post on the forum. One more question though: the definition of nut in the foam liencubiclowRe code is:
nut_ = Cmu*fMu*sqr(k_)/epsilon_; C5 term, implicit + max ( C5viscosity, dimensionedScalar("0", C5viscosity.dimensions(), 0.0) ); I don't see this expression in lien's papers at all. I think the correct form is nut_ = Cmu*fMu*sqr(k_)/epsilon_; Can you explain what is the second term on the right for? Thanks. Ning |
|
September 6, 2007, 06:42 |
Henry,
I am interested in t
|
#13 |
New Member
Martin Karlsson
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 13
Rep Power: 17 |
Henry,
I am interested in the report regarding non-linear turbulence models in foam. Is it possible to get one copy? Thanks in advance, Martin |
|
September 6, 2007, 06:55 |
The project was called the Rey
|
#14 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,906
Rep Power: 33 |
The project was called the Reynolds Solver project, sponsored by Audi, BMW, Ford,. Mercedes-Benz, Opel, Porsche and Renault and the European Union. I did a part of my PhD work on this: error estimation, automatic adaptive error-driven mesh refinement and implementation of various turbulence models.
Regarding the document, you will need to worry about confidentiality because the report was never released to the public. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
January 10, 2012, 08:53 |
Reference request for LienCubicKELoeRe model.
|
#15 |
New Member
Saeed Salehi
Join Date: Aug 2010
Posts: 27
Rep Power: 16 |
Hi.
I'm using the LienCubicKELoeRe model in OpenFOAM. Unfortunatley i couldn't find a reference for this model. the main paper (" Low-Reynolds-number eddy-viscosity modeling based on non-linear stress-strain/vorticity relations ") is not available online (or i couldnt find it). does anyone have this paper on one similar that has the LienCubicKELoeRe model formulation. Thanks. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|