|
[Sponsors] |
Temperature linearly rising after restarting a simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 1, 2014, 09:07 |
Temperature linearly rising after restarting a simulation
|
#1 |
New Member
Gennaro
Join Date: May 2014
Posts: 23
Rep Power: 12 |
Hi all,
I'm using a personalized version of CHT multiregion Foam which only solves the equation of Energy for the fluid part. The residuals as well as the T probes which I put to monitor the T field seem to be fine at the begin, and the T field starts to go towards a steady solution. However, if the simulation is stopped for whatever reason, then when I restart it the T field starts to linearly increase with no apparent cause. Any ideas about why this behaviour occurs? Thanks for your help Gennaro |
|
September 2, 2014, 04:37 |
|
#2 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Are you trying this in parallel or serial?
Maybe there is a problem when you read the fields (createFields.H), some misconfiguration when reading the fields, can make the solver read a field from another timestep |
|
September 2, 2014, 08:58 |
|
#3 | |
New Member
Gennaro
Join Date: May 2014
Posts: 23
Rep Power: 12 |
Quote:
thanks for your reply. I'm running in serial and I'm not sure what I might have done wrong with createFields.H. To me, it seems to be with no errors. If you want to have a look, here it's my createFields.H: Code:
// Initialise fluid field pointer lists PtrList<rhoThermo> thermoFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size()); PtrList<volScalarField> p_rghFluid(fluidRegions.size()); PtrList<volScalarField> ghFluid(fluidRegions.size()); PtrList<surfaceScalarField> ghfFluid(fluidRegions.size()); PtrList<radiation::radiationModel> radiation(fluidRegions.size()); List<scalar> initialMassFluid(fluidRegions.size()); List<label> pRefCellFluid(fluidRegions.size(), 0); List<scalar> pRefValueFluid(fluidRegions.size(), 0.0); PtrList<dimensionedScalar> rhoMax(fluidRegions.size()); PtrList<dimensionedScalar> rhoMin(fluidRegions.size()); PtrList<fv::IOoptionList> fluidFvOptions(fluidRegions.size()); PtrList<dimensionedScalar> Alambdas(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> Slambdas(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> Tlambdas(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> SMALLs(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> Sigmas(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> Lrefs(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> KEffMins(fluidRegions.size()); //Added DC /* List<dimensionedScalar> Alambdas(fluidRegions.size()); //Added DC List<dimensionedScalar> Slambdas(fluidRegions.size()); //Added DC List<dimensionedScalar> Tlambdas(fluidRegions.size()); //Added DC List<dimensionedScalar> SMALLs(fluidRegions.size()); //Added DC*/ PtrList<dimensionedScalar> Cp0s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho0s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho1s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho2s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho3s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho4s(fluidRegions.size()); //Added DC PtrList<dimensionedScalar> rho5s(fluidRegions.size()); //Added DC // PtrList<volScalarField> CpFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> CpEffFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> gTFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> fInvFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> magSqrGradTFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> rhoFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> TFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> KEffFluids(fluidRegions.size()); //Added DC PtrList<volScalarField> hKFluids(fluidRegions.size()); //Added DC // Populate fluid field pointer lists forAll(fluidRegions, i) { Info<< "*** Reading fluid mesh equation constants and \n thermophysical properties for region " << fluidRegions[i].name() << nl << endl; /* Info<< " Adding to thermoFluid\n" << endl; thermoFluid.set ( i, rhoThermo::New(fluidRegions[i]).ptr() );*/ IOdictionary equationConstants ( IOobject ( "equationConstants", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ); Info<< " Reading Alambda\n" << endl; Alambdas.set ( i, new dimensionedScalar(equationConstants.lookup("Alambda")) ); Info<< " Reading Slambda\n" << endl; Slambdas.set ( i, new dimensionedScalar(equationConstants.lookup("Slambda")) ); Info<< " Reading Tlambda\n" << endl; Tlambdas.set ( i, new dimensionedScalar(equationConstants.lookup("Tlambda")) ); Info<< " Reading SMALL\n" << endl; SMALLs.set ( i, new dimensionedScalar(equationConstants.lookup("SMALL")) ); Info<< " Reading Sigma\n" << endl; Sigmas.set ( i, new dimensionedScalar(equationConstants.lookup("Sigma")) ); Info<< " Reading Lref\n" << endl; Lrefs.set ( i, new dimensionedScalar(equationConstants.lookup("Lref")) ); Info<< " Reading KEffMin\n" << endl; KEffMins.set ( i, new dimensionedScalar(equationConstants.lookup("KEffMin")) ); /* Info<< " Reading Alambda\n" << endl; Alambdas[i].dimensions().reset(dimLength*dimTime/dimMass); Alambdas[i] = thermoFluid[i].lookup("AlambdaValue"); //thermoFluid DC Info<< " Reading Slambda\n" << endl; Slambdas[i].dimensions().reset(dimEnergy/dimMass/dimTemperature); Slambdas[i] = thermoFluid[i].lookup("SlambdaValue"); //thermoFluid DC Info<< " Reading Tlambda\n" << endl; Tlambdas[i].dimensions().reset(dimTemperature); Tlambdas[i] = thermoFluid[i].lookup("TlambdaValue"); //thermoFluid DC Info<< " Reading SMALL\n" << endl; SMALLs[i].dimensions().reset(pow(dimTemperature, 2)/dimArea); SMALLs[i] = thermoFluid[i].lookup("SMALLValue"); //thermoFluid DC*/ IOdictionary properties ( IOobject ( "thermophysicalProperties", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ); Info<< " Reading Cp0\n" << endl; Cp0s.set ( i, new dimensionedScalar(properties.lookup("Cp0")) ); Info<< " Reading rho0\n" << endl; rho0s.set ( i, new dimensionedScalar(properties.lookup("rho0")) ); Info<< " Reading rho1\n" << endl; rho1s.set ( i, new dimensionedScalar(properties.lookup("rho1")) ); Info<< " Reading rho2\n" << endl; rho2s.set ( i, new dimensionedScalar(properties.lookup("rho2")) ); Info<< " Reading rho3\n" << endl; rho3s.set ( i, new dimensionedScalar(properties.lookup("rho3")) ); Info<< " Reading rho4\n" << endl; rho4s.set ( i, new dimensionedScalar(properties.lookup("rho4")) ); Info<< " Reading rho5\n" << endl; rho5s.set ( i, new dimensionedScalar(properties.lookup("rho5")) ); /* Info<< " Adding to rhoFluid\n" << endl; rhoFluid.set ( i, new volScalarField ( IOobject ( "rho", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), thermoFluid[i].rho() ) );*/ rhoFluids.set ( i, new volScalarField ( IOobject ( "rho", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "rho", dimensionSet(1, -3, 0, 0, 0, 0, 0), scalar(0) ) ) ); /* Info<< " Adding to CpFluid\n" << endl; CpFluids.set ( i, new volScalarField ( IOobject ( "Cp", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), thermoFluid[i].Cp() ) );*/ /* CpFluids.set ( i, new volScalarField ( IOobject ( "Cp", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "Cp", dimensionSet(0, 2, -2, -1, 0, 0, 0), scalar(0) ) ) );*/ CpEffFluids.set ( i, new volScalarField ( IOobject ( "CpEff", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "CpEff", dimensionSet(0, 2, -2, -1, 0, 0, 0), scalar(0) ) ) ); gTFluids.set ( i, new volScalarField ( IOobject ( "gT", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "gT", dimensionSet(3,1,-9,-1,0,0,0), scalar(0) ) ) ); fInvFluids.set ( i, new volScalarField ( IOobject ( "fInv", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "fInv", dimensionSet(3,1,-9,-1,0,0,0), scalar(0) ) ) ); hKFluids.set ( i, new volScalarField ( IOobject ( "hK", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "hK", dimensionSet(1,2,-2,-1,0,0,0), scalar(0) ) ) ); Info<< " Adding to TFluid\n" << endl; TFluids.set ( i, new volScalarField ( IOobject ( "T", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); KEffFluids.set ( i, new volScalarField ( IOobject ( "KEff", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "KEff", dimensionSet(0,2,-1,0,0,0,0), scalar(0) ) ) ); magSqrGradTFluids.set ( i, new volScalarField ( IOobject ( "magSqrGradT", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::AUTO_WRITE ), fluidRegions[i], dimensionedScalar ( "magSqrGradT", dimensionSet(0,-2,0,2,0,0,0), scalar(0) ) ) ); /* Info<< " Adding to UFluid\n" << endl; UFluid.set ( i, new volVectorField ( IOobject ( "U", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) );*/ /* Info<< " Adding to phiFluid\n" << endl; phiFluid.set ( i, new surfaceScalarField ( IOobject ( "phi", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(rhoFluid[i]*UFluid[i]) & fluidRegions[i].Sf() ) );*/ /* Info<< " Adding to gFluid\n" << endl; gFluid.set ( i, new uniformDimensionedVectorField ( IOobject ( "g", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ) );*/ /* Info<< " Adding to turbulence\n" << endl; turbulence.set ( i, compressible::turbulenceModel::New ( rhoFluid[i], UFluid[i], phiFluid[i], thermoFluid[i] ).ptr() );*/ /* Info<< " Adding to ghFluid\n" << endl; ghFluid.set ( i, new volScalarField("gh", gFluid[i] & fluidRegions[i].C()) );*/ /* Info<< " Adding to ghfFluid\n" << endl; ghfFluid.set ( i, new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf()) );*/ /* p_rghFluid.set ( i, new volScalarField ( IOobject ( "p_rgh", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) );*/ // Force p_rgh to be consistent with p /* p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i]; radiation.set ( i, radiation::radiationModel::New(thermoFluid[i].T()) );*/ // initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value(); /* setRefCell ( thermoFluid[i].p(), p_rghFluid[i], fluidRegions[i].solutionDict().subDict("SIMPLE"), pRefCellFluid[i], pRefValueFluid[i] );*/ rhoMax.set ( i, new dimensionedScalar ( fluidRegions[i].solutionDict().subDict("SIMPLE").lookup ( "rhoMax" ) ) ); rhoMin.set ( i, new dimensionedScalar ( fluidRegions[i].solutionDict().subDict("SIMPLE").lookup ( "rhoMin" ) ) ); /* Info<< " Adding fvOptions\n" << endl; fluidFvOptions.set ( i, new fv::IOoptionList(fluidRegions[i]) );*/ } |
||
Tags |
chtmultiregionsimplefoam, heat and mass transfer, heat conduction |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restarting a CFX simulation from last stop | selvam2487 | CFX | 9 | September 9, 2014 12:00 |
pimpleDyMFoam, errors restarting a simulation | yosuu | OpenFOAM Running, Solving & CFD | 0 | May 28, 2014 13:06 |
Restarting the simulation | KTJ | STAR-CCM+ | 3 | April 30, 2014 15:39 |
Restarting KIVA simulation | Tomislav | Main CFD Forum | 2 | April 5, 2006 04:22 |
need suggestion on temperature simulation | Bin Li | CFX | 4 | June 23, 2000 03:35 |