View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004050 | OpenFOAM | Bug | public | 2024-02-12 19:30 | 2024-02-12 19:36 |
Reporter | sr_786 | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Linux | OS | OpenSuSE | OS Version | 15.4 |
Product Version | dev | ||||
Summary | 0004050: OpenFOAM-9 Issue With Compiling SSG and LRR | ||||
Description | Attempting to compile SSG prior to making modifications using OpenFOAM-9. First attempted compile methodology using for kEpsilon & kOmega. Both strategies worked fine. When attempted to do same for SSG an error message was reported preventing me from compiling SSG. Also tried compiling for other RSM model, LRR and found same issues. Error message for SSG: Making dependency list for source file mykinematicMomentumTransportModels.C g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o In file included from mySSG.H:210:0, from mykinematicMomentumTransportModels.C:49: mySSG.C: In instantiation of ‘Foam::RASModels::mySSG<BasicMomentumTransportModel>::mySSG(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&) [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModels::mySSG<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModels::mySSG<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModels::mySSG<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’: /home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘static Foam::autoPtr<Foam::RASModel<BasicMomentumTransportModel> > Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&) [with RASModelType = Foam::RASModels::mySSG<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModel<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModel<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModel<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’ /home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::mySSG<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’ mykinematicMomentumTransportModels.C:50:1: required from here mySSG.C:228:14: error: ‘bound’ was not declared in this scope bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mySSG.C:228:14: note: suggested alternative: ‘found’ bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ found mySSG.C: In instantiation of ‘void Foam::RASModels::mySSG<BasicMomentumTransportModel>::correct() [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’: mykinematicMomentumTransportModels.C:50:20: required from here mySSG.C:335:10: error: ‘bound’ was not declared in this scope bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mySSG.C:335:10: note: suggested alternative: ‘found’ bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ found make: *** [/home/cfd/OpenFOAM/OpenFOAM-9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o] Error 1 Error message for LRR wmake libso . g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o In file included from myLRR.H:219:0, from mykinematicMomentumTransportModels.C:49: myLRR.C: In instantiation of ‘Foam::RASModels::myLRR<BasicMomentumTransportModel>::myLRR(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&) [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModels::myLRR<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModels::myLRR<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModels::myLRR<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’: /home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘static Foam::autoPtr<Foam::RASModel<BasicMomentumTransportModel> > Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&) [with RASModelType = Foam::RASModels::myLRR<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModel<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModel<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModel<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’ /home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::myLRR<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’ mykinematicMomentumTransportModels.C:50:1: required from here myLRR.C:219:14: error: ‘bound’ was not declared in this scope bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ myLRR.C:219:14: note: suggested alternative: ‘found’ bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ found myLRR.C: In instantiation of ‘void Foam::RASModels::myLRR<BasicMomentumTransportModel>::correct() [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’: mykinematicMomentumTransportModels.C:50:20: required from here myLRR.C:325:10: error: ‘bound’ was not declared in this scope bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ myLRR.C:325:10: note: suggested alternative: ‘found’ bound(epsilon_, this->epsilonMin_); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ found make: *** [/home/cfd/OpenFOAM/OpenFOAM-9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o] Error 1 | ||||
Steps To Reproduce | See files attached below | ||||
Additional Information | This problem is reported for OpenFOAM-9. | ||||
Tags | No tags attached. | ||||
|
mykinematicMomentumTransportModels.C (1,821 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "kinematicMomentumTransportModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // makeBaseMomentumTransportModel ( geometricOneField, geometricOneField, incompressibleMomentumTransportModel, IncompressibleMomentumTransportModel, kinematicTransportModel ); // -------------------------------------------------------------------------- // // RAS models // -------------------------------------------------------------------------- // #include "mySSG.H" makeRASModel(mySSG); // ************************************************************************* // mySSG.C (10,038 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "mySSG.H" #include "fvModels.H" #include "fvConstraints.H" #include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { namespace RASModels { // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class BasicMomentumTransportModel> void mySSG<BasicMomentumTransportModel>::correctNut() { this->nut_ = this->Cmu_*sqr(k_)/epsilon_; this->nut_.correctBoundaryConditions(); fvConstraints::New(this->mesh_).constrain(this->nut_); } template<class BasicMomentumTransportModel> tmp<fvScalarMatrix> mySSG<BasicMomentumTransportModel>::epsilonSource() const { return tmp<fvScalarMatrix> ( new fvScalarMatrix ( epsilon_, dimVolume*this->rho_.dimensions()*epsilon_.dimensions()/dimTime ) ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class BasicMomentumTransportModel> mySSG<BasicMomentumTransportModel>::mySSG ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& type ) : ReynoldsStress<RASModel<BasicMomentumTransportModel>> ( type, alpha, rho, U, alphaRhoPhi, phi, transport ), Cmu_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cmu", this->coeffDict_, 0.09 ) ), C1_ ( dimensioned<scalar>::lookupOrAddToDict ( "C1", this->coeffDict_, 3.4 ) ), C1s_ ( dimensioned<scalar>::lookupOrAddToDict ( "C1s", this->coeffDict_, 1.8 ) ), C2_ ( dimensioned<scalar>::lookupOrAddToDict ( "C2", this->coeffDict_, 4.2 ) ), C3_ ( dimensioned<scalar>::lookupOrAddToDict ( "C3", this->coeffDict_, 0.8 ) ), C3s_ ( dimensioned<scalar>::lookupOrAddToDict ( "C3s", this->coeffDict_, 1.3 ) ), C4_ ( dimensioned<scalar>::lookupOrAddToDict ( "C4", this->coeffDict_, 1.25 ) ), C5_ ( dimensioned<scalar>::lookupOrAddToDict ( "C5", this->coeffDict_, 0.4 ) ), Ceps1_ ( dimensioned<scalar>::lookupOrAddToDict ( "Ceps1", this->coeffDict_, 1.44 ) ), Ceps2_ ( dimensioned<scalar>::lookupOrAddToDict ( "Ceps2", this->coeffDict_, 1.92 ) ), Cs_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cs", this->coeffDict_, 0.25 ) ), Ceps_ ( dimensioned<scalar>::lookupOrAddToDict ( "Ceps", this->coeffDict_, 0.15 ) ), k_ ( IOobject ( IOobject::groupName("k", alphaRhoPhi.group()), this->runTime_.timeName(), this->mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), 0.5*tr(this->R_) ), epsilon_ ( IOobject ( IOobject::groupName("epsilon", alphaRhoPhi.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ) { if (type == typeName) { this->printCoeffs(type); this->boundNormalStress(this->R_); bound(epsilon_, this->epsilonMin_); k_ = 0.5*tr(this->R_); } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class BasicMomentumTransportModel> bool mySSG<BasicMomentumTransportModel>::read() { if (ReynoldsStress<RASModel<BasicMomentumTransportModel>>::read()) { Cmu_.readIfPresent(this->coeffDict()); C1_.readIfPresent(this->coeffDict()); C1s_.readIfPresent(this->coeffDict()); C2_.readIfPresent(this->coeffDict()); C3_.readIfPresent(this->coeffDict()); C3s_.readIfPresent(this->coeffDict()); C4_.readIfPresent(this->coeffDict()); C5_.readIfPresent(this->coeffDict()); Ceps1_.readIfPresent(this->coeffDict()); Ceps2_.readIfPresent(this->coeffDict()); Cs_.readIfPresent(this->coeffDict()); Ceps_.readIfPresent(this->coeffDict()); return true; } else { return false; } } template<class BasicMomentumTransportModel> tmp<volSymmTensorField> mySSG<BasicMomentumTransportModel>::DREff() const { return volSymmTensorField::New ( "DREff", (Cs_*(this->k_/this->epsilon_))*this->R_ + I*this->nu() ); } template<class BasicMomentumTransportModel> tmp<volSymmTensorField> mySSG<BasicMomentumTransportModel>::DepsilonEff() const { return volSymmTensorField::New ( "DepsilonEff", (Ceps_*(this->k_/this->epsilon_))*this->R_ + I*this->nu() ); } template<class BasicMomentumTransportModel> void mySSG<BasicMomentumTransportModel>::correct() { if (!this->turbulence_) { return; } // Local references const alphaField& alpha = this->alpha_; const rhoField& rho = this->rho_; const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_; const volVectorField& U = this->U_; volSymmTensorField& R = this->R_; const Foam::fvModels& fvModels(Foam::fvModels::New(this->mesh_)); const Foam::fvConstraints& fvConstraints ( Foam::fvConstraints::New(this->mesh_) ); ReynoldsStress<RASModel<BasicMomentumTransportModel>>::correct(); tmp<volTensorField> tgradU(fvc::grad(U)); const volTensorField& gradU = tgradU(); volSymmTensorField P(-twoSymm(R & gradU)); volScalarField G(this->GName(), 0.5*mag(tr(P))); // Update epsilon and G at the wall epsilon_.boundaryFieldRef().updateCoeffs(); // Dissipation equation tmp<fvScalarMatrix> epsEqn ( fvm::ddt(alpha, rho, epsilon_) + fvm::div(alphaRhoPhi, epsilon_) - fvm::laplacian(alpha*rho*DepsilonEff(), epsilon_) == Ceps1_*alpha*rho*G*epsilon_/k_ - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_) + epsilonSource() + fvModels.source(alpha, rho, epsilon_) ); epsEqn.ref().relax(); fvConstraints.constrain(epsEqn.ref()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef()); solve(epsEqn); fvConstraints.constrain(epsilon_); bound(epsilon_, this->epsilonMin_); // Correct the trace of the tensorial production to be consistent // with the near-wall generation from the wall-functions const fvPatchList& patches = this->mesh_.boundary(); forAll(patches, patchi) { const fvPatch& curPatch = patches[patchi]; if (isA<wallFvPatch>(curPatch)) { forAll(curPatch, facei) { label celli = curPatch.faceCells()[facei]; P[celli] *= min ( G[celli]/(0.5*mag(tr(P[celli])) + small), 1.0 ); } } } volSymmTensorField b(dev(R)/(2*k_)); volSymmTensorField S(symm(gradU)); volTensorField Omega(skew(gradU)); // Reynolds stress equation tmp<fvSymmTensorMatrix> REqn ( fvm::ddt(alpha, rho, R) + fvm::div(alphaRhoPhi, R) - fvm::laplacian(alpha*rho*DREff(), R) + fvm::Sp(((C1_/2)*epsilon_ + (C1s_/2)*G)*alpha*rho/k_, R) == alpha*rho*P - ((1.0/3.0)*I)*(((2.0 - C1_)*epsilon_ - C1s_*G)*alpha*rho) + (C2_*(alpha*rho*epsilon_))*dev(innerSqr(b)) + alpha*rho*k_ *( (C3_ - C3s_*mag(b))*dev(S) + C4_*dev(twoSymm(b&S)) + C5_*twoSymm(b&Omega) ) + this->RSource() + fvModels.source(alpha, rho, R) ); REqn.ref().relax(); fvConstraints.constrain(REqn.ref()); solve(REqn); fvConstraints.constrain(R); this->boundNormalStress(R); k_ = 0.5*tr(R); correctNut(); // Correct wall shear-stresses when applying wall-functions this->correctWallShearStress(R); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace RASModels } // End namespace Foam // ************************************************************************* // mySSG.H (5,952 bytes)
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::RASModels::mySSG Description Speziale, Sarkar and Gatski Reynolds-stress turbulence model for incompressible and compressible flows. Reference: \verbatim Speziale, C. G., Sarkar, S., & Gatski, T. B. (1991). Modelling the pressure–strain correlation of turbulence: an invariant dynamical systems approach. Journal of Fluid Mechanics, 227, 245-272. \endverbatim Including the generalised gradient diffusion model of Daly and Harlow: \verbatim Daly, B. J., & Harlow, F. H. (1970). Transport equations in turbulence. Physics of Fluids (1958-1988), 13(11), 2634-2649. \endverbatim The default model coefficients are: \verbatim mySSGCoeffs { Cmu 0.09; C1 3.4; C1s 1.8; C2 4.2; C3 0.8; C3s 1.3; C4 1.25; C5 0.4; Ceps1 1.44; Ceps2 1.92; Cs 0.25; Ceps 0.15; couplingFactor 0.0; } \endverbatim SourceFiles mySSG.C \*---------------------------------------------------------------------------*/ #ifndef mySSG_H #define mySSG_H #include "RASModel.H" #include "ReynoldsStress.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { namespace RASModels { /*---------------------------------------------------------------------------*\ Class mySSG Declaration \*---------------------------------------------------------------------------*/ template<class BasicMomentumTransportModel> class mySSG : public ReynoldsStress<RASModel<BasicMomentumTransportModel>> { protected: // Protected data // Model coefficients dimensionedScalar Cmu_; dimensionedScalar C1_; dimensionedScalar C1s_; dimensionedScalar C2_; dimensionedScalar C3_; dimensionedScalar C3s_; dimensionedScalar C4_; dimensionedScalar C5_; dimensionedScalar Ceps1_; dimensionedScalar Ceps2_; dimensionedScalar Cs_; dimensionedScalar Ceps_; // Fields volScalarField k_; volScalarField epsilon_; // Protected Member Functions //- Update the eddy-viscosity virtual void correctNut(); //- Source term for the epsilon equation virtual tmp<fvScalarMatrix> epsilonSource() const; public: typedef typename BasicMomentumTransportModel::alphaField alphaField; typedef typename BasicMomentumTransportModel::rhoField rhoField; typedef typename BasicMomentumTransportModel::transportModel transportModel; //- Runtime type information TypeName("mySSG"); // Constructors //- Construct from components mySSG ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& type = typeName ); //- Disallow default bitwise copy construction mySSG(const mySSG&) = delete; //- Destructor virtual ~mySSG() {} // Member Functions //- Read model coefficients if they have changed virtual bool read(); //- Return the turbulence kinetic energy virtual tmp<volScalarField> k() const { return k_; } //- Return the turbulence kinetic energy dissipation rate virtual tmp<volScalarField> epsilon() const { return epsilon_; } //- Return the effective diffusivity for R tmp<volSymmTensorField> DREff() const; //- Return the effective diffusivity for epsilon tmp<volSymmTensorField> DepsilonEff() const; //- Solve the turbulence equations and correct eddy-Viscosity and // related properties virtual void correct(); // Member Operators //- Disallow default bitwise assignment void operator=(const mySSG&) = delete; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace RASModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository #include "mySSG.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* // files (96 bytes)
mykinematicMomentumTransportModels.C LIB = $(FOAM_LIBBIN)/mykinematicMomentumTransportModels options (391 bytes)
EXE_INC = \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ LIB_LIBS = \ -ltransportModels \ -lmomentumTransportModels \ -lfiniteVolume \ -lmeshTools |
|
User support request |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-02-12 19:30 | sr_786 | New Issue | |
2024-02-12 19:30 | sr_786 | File Added: mykinematicMomentumTransportModels.C | |
2024-02-12 19:30 | sr_786 | File Added: mySSG.C | |
2024-02-12 19:30 | sr_786 | File Added: mySSG.H | |
2024-02-12 19:30 | sr_786 | File Added: files | |
2024-02-12 19:30 | sr_786 | File Added: options | |
2024-02-12 19:36 | henry | Assigned To | => henry |
2024-02-12 19:36 | henry | Status | new => closed |
2024-02-12 19:36 | henry | Resolution | open => no change required |
2024-02-12 19:36 | henry | Note Added: 0013187 |