CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   value of previous time step in "chtMultiregionFoam" Solver (https://www.cfd-online.com/Forums/openfoam-programming-development/177264-value-previous-time-step-chtmultiregionfoam-solver.html)

Mohammad Jam September 9, 2016 04:10

value of previous time step in "chtMultiregionFoam" Solver
 
Hi

How to implement .oldTime(); after writing volScalarField in chtMultiregionFoam?

When i do that it gives this error:
class Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ has no member named ‘oldTime’


Quote:

PtrList<volScalarField> lapSolid(solidRegions.size());

Info<< " Adding to Xn \n" << endl; // initialize the volScalarrField
Xn.set
(
i,
new volScalarField
(
IOobject
(
"Xn",
runTime.timeName(),
solidRegions[i],
IOobject::NO_READ,
IOobject::NO_WRITE
),
solidRegions[i],
dimensionedScalar("Xn", dimensionSet(0,-2,0,1,0,0,0), scalar(1.0))
)
);


xn.oldTime(); // this should overwrite the xn with the results obtained in the previous step
// I THINK THIS IS NOT WORKING!!


All times are GMT -4. The time now is 04:07.