|
[Sponsors] |
August 3, 2011, 05:49 |
localEuler in rhoCentralFoam
|
#1 |
Super Moderator
|
In order to do steady state calculations with rhoCentralFoam, I am trying to use localEuler ddt scheme. From what I understood, this requires specifying rDeltaT as a volScalarField. I have made following additions to rhoCentralFoam in version 2.0.0
createField.H: Code:
volScalarField rDeltaT ( IOobject ( "rDeltaT", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, 1/dimensionedScalar("maxDeltaT", dimTime, GREAT), zeroGradientFvPatchScalarField::typeName ); Code:
{ // Set the reciprocal time-step from the local Courant number rDeltaT.dimensionedInternalField() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(amaxSf)().dimensionedInternalField() /(maxCo*mesh.V()) ); // Update tho boundary values of the reciprocal time-step rDeltaT.correctBoundaryConditions(); } Code:
surfaceScalarField aphiv_pos(phiv_pos - aSf); surfaceScalarField aphiv_neg(phiv_neg + aSf); // Reuse amaxSf for the maximum positive and negative fluxes // estimated by the central scheme amaxSf = max(mag(aphiv_pos), mag(aphiv_neg)); #include "compressibleCourantNo.H" #include "readTimeControls.H" //#include "setDeltaT.H" #include "setrDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; Code:
ddtSchemes { default localEuler rDeltaT; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NACA0012 with rhoCentralFoam | praveen | OpenFOAM | 17 | July 5, 2018 05:49 |
rhoCentralFoam with totalPressure/totalTemperature at inlet of subsonic channel | deepblue17 | OpenFOAM Running, Solving & CFD | 5 | February 11, 2013 02:42 |
Hypersonic flow rhoCentralFoam | ishaninair | OpenFOAM Running, Solving & CFD | 0 | April 7, 2011 04:38 |
Always crash when solve a C-D nozzle flow field using rhoCentralFoam | hawklion | OpenFOAM Running, Solving & CFD | 0 | March 9, 2011 06:13 |