|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 10 ![]() |
Hello,
I want to change change for kEpsilon model and define it as a local variable for the whole domain. So, would remain same but![]() Currently it is defined as dimensionedScalar. I am thinking that first I should define it as volScalarField and then do the changes. I would appreciate any help and guidance. Thanks |
|
|
|
|
|
|
|
|
#2 |
|
Member
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 15 ![]() |
Hi Vedamt,
I have not worked with Turbulence models but I can suggest a general way to proceed. As you said couple of things need to be done. 1. Remove the cMu variable as a diemnsionedScalar from createFields.H and instead create a scalarField similar to P. And initialize to say zero. Code:
Info<< "Creating field cMu\n" << endl;
volScalarField cMu
(
IOobject
(
"cMu",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("cMu", dimensionSet(0,0,0,0,0,0,0), scalar(0.0)) // give proper dimensions
);
Code:
forAll ( mesh.C(), cellI)
{
cMu[cellI] = // your code here
}
forAll (mesh.boundaryMesh(), patchI)
{
forAll(mesh.boundaryMesh()[patchI], faceI)
{
cMu.boundaryField()[patchI][faceI] = //your code here
}
}
4. Also do remove the value from transportProperties of case/constant/ if it is being read from that file. best, Sugajen |
|
|
|
|
|
![]() |
| Tags |
| kepsilon, turbulent viscosity, volscalarfield |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CFX - Bingham Model with yield stess variable with temperature | annagoco | ANSYS | 1 | July 16, 2019 17:26 |
| NEW turbulence TRANSITIONAL model | giammy92 | OpenFOAM | 3 | June 30, 2016 10:47 |
| coalChemistryFoam: "Foam::error::printStack(Foam::Ostream&) at ??:?" | musabai | OpenFOAM Running, Solving & CFD | 2 | February 20, 2015 15:07 |
| Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
| K - epsilon VS SST turbulence model | Maicol | Main CFD Forum | 0 | November 30, 2012 17:25 |