CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   reactingMultiphaseEulerFoam new turbulance models (https://www.cfd-online.com/Forums/openfoam-solving/226425-reactingmultiphaseeulerfoam-new-turbulance-models.html)

geth03 April 27, 2020 09:29

reactingMultiphaseEulerFoam new turbulance models
 
hi,

i want to add my turbulunce model to reactingMultiphaseEulerFoam.
For that i created a copy of the solver to $FOAM_RUN.
I adjusted every make/file- and make/option-files already, so i renamed the solver and compiled successfully.

Obviously for reactingMultiphaseEulerFoam there are only 2 RAS models available, k-epsilon and k-omega-sst. those are created in the file
multiphaseCompressibleTurbulenceModels.C.

Code:

#include "phaseCompressibleTurbulenceModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"

#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

makeTurbulenceModelTypes
(
    volScalarField,
    volScalarField,
    compressibleTurbulenceModel,
    PhaseCompressibleTurbulenceModel,
    ThermalDiffusivity,
    phaseModel
);

makeBaseTurbulenceModel
(
    volScalarField,
    volScalarField,
    compressibleTurbulenceModel,
    PhaseCompressibleTurbulenceModel,
    ThermalDiffusivity,
    phaseModel
);

#define makeLaminarModel(Type)                                                \
    makeTemplatedLaminarModel                                                  \
    (phaseModelPhaseCompressibleTurbulenceModel, laminar, Type)

#define makeRASModel(Type)                                                    \
    makeTemplatedTurbulenceModel                                              \
    (phaseModelPhaseCompressibleTurbulenceModel, RAS, Type)

#define makeLESModel(Type)                                                    \
    makeTemplatedTurbulenceModel                                              \
    (phaseModelPhaseCompressibleTurbulenceModel, LES, Type)

#include "Stokes.H"
makeLaminarModel(Stokes);

#include "kEpsilon.H"
makeRASModel(kEpsilon);

#include "kOmegaSST.H"
makeRASModel(kOmegaSST);

#include "Smagorinsky.H"
makeLESModel(Smagorinsky);

#include "kEqn.H"
makeLESModel(kEqn);

// basic k omega model
#include "kOmega.H"
makeRASModel(kOmega);

// my model
#include "mykOmegaSST.H"
makeRASModel(mykOmegaSST);


// ************************************************************************* //

i tried to add the lines for the basic kOmega model because the links should be available from other two RAS models.

i also created local copies of kOmegaSST model in the same directory where multiphaseCompressibleTurbulenceModel.C is located. i changed names accordingly, so my files and classes etc are named mykOmegaSST.H etc.

so when i run ./Allmake from parent directory, compilation runs without error, but when i run my solver, it does not recognize my models. None of them.

does anybody know how to create turbulence models for reactingMultiphaseEulerFoam, it is not as trivial as creating copies of existing models and linking them in controldict with libs("...so");

thanks and regards


All times are GMT -4. The time now is 11:34.