These functions adjusts the time step to match a reaction process. The
adjustTimeStepToChemistry fucntion adjusts based on the chemistry
model's stored chemical time step, and adjustTimeStepToCombustion
adjusts to match bulk reaction time scales. The latter requires
specification of a Courant-like number, to control approximately how
much of the reaction is permitted to be completed in a single
time-step.
These functions allow the solver to temporally resolve chemical changes,
in order to better couple the reactions with the transport, or in order
improve the time-accuracy of post-processing.
Example usage by dictionary specification:
adjustTimeStepToChemistry1
{
type adjustTimeStepToChemistry;
libs ("libchemistryModel.so");
}
adjustTimeStepToCombustion1
{
type adjustTimeStepToCombustion;
libs ("libchemistryModel.so");
maxCo 0.1;
}
Example usage via the included packaged function:
#includeFunc adjustTimeStepToChemistry
#includeFunc adjustTimeStepToCombustion(maxCo=0.1)
29 lines
1.3 KiB
C++
29 lines
1.3 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
Description
|
|
Adjusts the time step to a combustion model's bulk reaction time scales
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
type adjustTimeStepToCombustion;
|
|
libs ("libchemistryModel.so");
|
|
|
|
//phase <phaseName>; // Optional name of the phase to which the
|
|
// combustion model applies
|
|
|
|
maxCo <maxCo>; // Maximum combustion "Courant" number. The
|
|
// maximum fraction of the total reaction
|
|
// time-scale that should be evolved in a single
|
|
// time-step.
|
|
|
|
//extrapolate no; // Extrapolate reductions in time-step to try and
|
|
// better catch the "onset" of reaction. Can lead
|
|
// to time-step oscillation.
|
|
|
|
// ************************************************************************* //
|