Skip to content

Commit e3e2c28

Browse files
authored
Merge pull request #13845 from cxp484/master
FDS Manuals: Modify the CVODE section of user guide for better readability.
2 parents 6429acb + 3e1b0d0 commit e3e2c28

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5506,37 +5506,40 @@ \subsection{Chemical Time Integration}
55065506

55075507
If you have multiple reactions with widely ranging time-scales, you might want to specify \linebreak[4]\ct{CHECK_REALIZABILITY} to be \ct{T} on the \ct{COMB} line, which forces the program to issue a warning if the species mass fractions do not remain between 0 and 1 during the integration scheme.
55085508

5509-
For solving the chemistry with a detailed chemical mechanism (see Section \ref{info:detailedChemMech}), the recommended ODE solver is CVODE from Sundials \cite{cvodeDoc:2024}. The following line instructs FDS to solve the chemistry with the CVODE solver using an absolute error tolerance of $10^{-10}$ and a relative error tolerance of $10^{-8}$:
5509+
To solve chemistry using a detailed chemical mechanism (see Section \ref{info:detailedChemMech}), it is recommended to use the CVODE ODE solver from Sundials \cite{cvodeDoc:2024}. The following input line configures FDS to use CVODE for chemistry calculations:
55105510
\begin{lstlisting}
5511-
&COMB
5512-
FINITE_RATE_MIN_TEMP=300,
5513-
ODE_SOLVER='CVODE',
5514-
ZZ_MIN_GLOBAL=1E-15,
5515-
ODE_MIN_ATOL=1E-12,
5516-
ODE_REL_ERROR=1E-6,
5517-
EQUIV_RATIO_CHECK=T,
5518-
MIN_EQUIV_RATIO=0.0,
5519-
MAX_EQUIV_RATIO=20.0,
5520-
DO_CHEM_LOAD_BALANCE=T /
5511+
&COMB ODE_SOLVER='CVODE'/
55215512
\end{lstlisting}
5522-
However, the relative and absolute tolerances for ODEs can be specified at the species level using the \ct{ODE_REL_ERROR} and \ct{ODE_ABS_ERROR} parameters. Currently, CVODE only supports absolute tolerance at the species level. The parameters \ct{EQUIV_RATIO_CHECK}, \ct{MIN_EQUIV_RATIO}, and \ct{MAX_EQUIV_RATIO} are optional. The purpose of \ct{EQUIV_RATIO_CHECK} (when true) is to save computational time by calling the chemistry solver only for cells where the equivalence ratio is within the specified \ct{MIN_EQUIV_RATIO} and \ct{MAX_EQUIV_RATIO} limits. Additionally, setting the parameter \ct{DO_CHEM_LOAD_BALANCE} to true can significantly accelerate chemistry calculations by evenly distributing the chemistry workload across all MPI processes. The minimum concentration limit of a species is determined by multiplying \ct{ODE_REL_ERROR} to \ct{ZZ_MIN_GLOBAL}. Concentrations below this threshold are considered to be zero.
5523-
5524-
For CVODE, the default parameter values are as follows:
5513+
Internally, CVODE assigns default values to several key parameters, as listed below:
55255514
\begin{itemize}
5515+
\setlength{\itemsep}{-4pt}
55265516
\item \ct{FINITE_RATE_MIN_TEMP}=300~$^\circ$C
5527-
\item \ct{ZZ_MIN_GLOBAL}=1E-10
55285517
\item \ct{ODE_MIN_ATOL}=1E-10
55295518
\item \ct{ODE_REL_ERROR}=1E-6
5519+
\item \ct{ZZ_MIN_GLOBAL}=1E-10
55305520
\item \ct{EQUIV_RATIO_CHECK}=F
55315521
\item \ct{MIN_EQUIV_RATIO}=0.0
55325522
\item \ct{MAX_EQUIV_RATIO}=20.0
55335523
\item \ct{DO_CHEM_LOAD_BALANCE}=T
55345524
\end{itemize}
5535-
To use these default values, simply add the following lines to the FDS input file:
5525+
The parameter \ct{FINITE_RATE_MIN_TEMP} defines the minimum temperature (in ~$^\circ$C) above which chemistry calculation will be performed. CVODE allows specification of relative and absolute tolerances at the species-level using the \ct{ODE_REL_ERROR} and \ct{ODE_ABS_ERROR} parameters in the \ct{SPEC} input line. These tolerances can also be set globally in the \ct{COMB} input line, with species-level settings taking precedence. Currently, CVODE only allows absolute tolerance at the species level. The minimum concentration of a species is determined as the product of \ct{ODE_REL_ERROR} and \ct{ZZ_MIN_GLOBAL}. Concentrations below this threshold are treated as zero.
5526+
5527+
Additional optional parameters include \ct{EQUIV_RATIO_CHECK}, \ct{MIN_EQUIV_RATIO}, and \ct{MAX_EQUIV_RATIO}. When \ct{EQUIV_RATIO_CHECK} is enabled (set to true), the chemistry calculation is performed only for those cells for which equivalence ratio is within the specified \ct{MIN_EQUIV_RATIO} and \ct{MAX_EQUIV_RATIO} limits, reducing computational time. Enabling \ct{DO_CHEM_LOAD_BALANCE} significantly accelerates chemistry calculations by distributing the computational load evenly across all MPI processes.
5528+
User can modify the default values of any or all of these parameters as needed using the following line in the FDS input file:
55365529
\begin{lstlisting}
5537-
&COMB ODE_SOLVER='CVODE'/
5530+
&COMB
5531+
ODE_SOLVER='CVODE'
5532+
FINITE_RATE_MIN_TEMP=300,
5533+
ZZ_MIN_GLOBAL=1E-15,
5534+
ODE_MIN_ATOL=1E-12,
5535+
ODE_REL_ERROR=1E-6,
5536+
EQUIV_RATIO_CHECK=T,
5537+
MIN_EQUIV_RATIO=0.0,
5538+
MAX_EQUIV_RATIO=20.0,
5539+
DO_CHEM_LOAD_BALANCE=T /
55385540
\end{lstlisting}
55395541

5542+
55405543
\newpage
55415544

55425545
\section{Aerosol Deposition}

0 commit comments

Comments
 (0)