Calculating viscosity as a function of alpha
Hello
I want to modify the thermoPhysicalModels library in a way that by changing alpha, viscosity change. The problem is alpha should be read from mesh and mesh should be defined in defining mu. The original mu definition that I want to change is located in openfoam2006/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H as follow: Code:
template<class Thermo, int PolySize> Code:
template<class Thermo, int PolySize> I looked at some other codes in openfoam and initializing mesh can be done by a code like Code:
const fvMesh& mesh = alpha1_.mesh(); Code:
const fvMesh& mesh = this->mesh(); it is not working because this does not have a member named mesh, or . Code:
const fvMesh& mesh = T.mesh(); So any suggestion how I can initialize mesh here? |
Hey,
I'm not sure if this will help you but this is how I would proceed: This class is templated by a template class Thermo, the constructor of Thermo gets called in the initialisation list. The thermo s are obiously constructed with the input parameter "mesh", but there is no reference variable which stores the adress of mesh (which also means it wont get inherited). Thats where I think you have to go via one of the Field variables, because they store it (take a look at GeomtricField class) I would try to get the mesh initialised by Thermo::T_.mesh() or by calling the return function Thermo.T().mesh(). I really hope that will help you, but I'm also kind of new in this field :o Quote:
|
Quote:
|
All times are GMT -4. The time now is 07:04. |