CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Not all fields written as part of solution (https://www.cfd-online.com/Forums/openfoam/87548-not-all-fields-written-part-solution.html)

adhiraj April 22, 2011 18:46

Not all fields written as part of solution
 
Hey all,
I am simulating a laminar diffusion flame using a solver that is built on the lines of reactingFoam in version 1.7.1. I have added some new fields for calculations, like the diffusivities, viscosities, mole fractions, etc. But I find that while running, some fields are not being written to the solution, even when I initialize them like this:
Code:

mu_
(
    IOobject
    (
        "mu",
        mesh.time().timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh,
    dimensionedScalar("zero",dimensionSet(1,-1,-1,0,0,0,0),0 )
)

I am using this initializer as part of a constructor of an object where I have this defines. Strangely, some other objects (volScalarFields) initialized in this way get written properly.
Any ideas? Thanks in advance.

nimasam April 23, 2011 04:54

i guess you are going to define ur variable twice!
mu_ maybe is defined in another file too

adhiraj April 23, 2011 11:16

Thanks for replying. Actually I managed to fix the issue by changning the string
"mu" to "Mu" in the function call. Maybe it was in conflict with a different variable of same name in the IOdict .


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