|
[Sponsors] |
August 3, 2011, 06: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; } |
|
September 10, 2011, 15:18 |
|
#2 |
New Member
Join Date: Aug 2010
Location: Chennai
Posts: 24
Rep Power: 16 |
@praveen
http://www.cfd-online.com/Forums/ope...time-step.html In the above thread, check my last post (which is working fine for me )...U may get some idea : ) Cheers! Hariram |
|
January 9, 2012, 15:06 |
|
#3 |
Member
Eric M. Tridas
Join Date: May 2011
Location: Tampa, Florida
Posts: 48
Rep Power: 15 |
Praveen,
Have you had any more success implementing the localEuler ddt scheme? I am very interested in this aspect as my simulations using rhoCentralFoam are take ages to compute. Thanks, -Eric |
|
February 23, 2012, 11:31 |
|
#4 | |
Member
Laurens Van Dyck
Join Date: Jul 2011
Location: Netherlands/Germany
Posts: 34
Rep Power: 15 |
Im not sure if the poster is still following this but if you are, where did you get that definition for rDeltaT?
Code:
rDeltaT.dimensionedInternalField() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(amaxSf)().dimensionedInternalField() /(maxCo*mesh.V()) ); Code:
surfaceScalarField amaxSfbyDelta ( mesh.surfaceInterpolation::deltaCoeffs()*amaxSf ); CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue(); In other words, is there a command that finds the maximum surface value of a cell? My current (not completely correct) implementation for rDeltaT is the following: Quote:
When you look at the interFoamLTS source code you can also find how to implement smoothing over the rDeltaT field which you might consider implementing if you have big differences in timestep between neighboring cells. |
||
October 21, 2012, 03:19 |
|
#5 |
Super Moderator
|
Suppose is maximum wave speed in the face normal direction across the face between cell i and cell j. Let be area of this face. Then time step in cell i should be
where the sum is over all face neighbouring cells of cell i. Introducing a courant number maxCo, we get The time step condition can be seen by applying first order upwind scheme to a scalar convection equation. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NACA0012 with rhoCentralFoam | praveen | OpenFOAM | 17 | July 5, 2018 06:49 |
rhoCentralFoam with totalPressure/totalTemperature at inlet of subsonic channel | deepblue17 | OpenFOAM Running, Solving & CFD | 5 | February 11, 2013 03:42 |
Hypersonic flow rhoCentralFoam | ishaninair | OpenFOAM Running, Solving & CFD | 0 | April 7, 2011 05:38 |
Always crash when solve a C-D nozzle flow field using rhoCentralFoam | hawklion | OpenFOAM Running, Solving & CFD | 0 | March 9, 2011 07:13 |