Skip to content

Commit 20f3990

Browse files
Merge pull request #14699 from johodges/master
FDS Source: allow locking time step during FREEZE_TIME
2 parents 6fc5d42 + 89f4ff3 commit 20f3990

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

Manuals/FDS_User_Guide/FDS_User_Guide.tex

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9266,11 +9266,18 @@ \subsection*{Reading the Fields}
92669266
\end{lstlisting}
92679267
and FDS will read, for example, \ct{CHID_uvw_t1_m1.csv} through \ct{CHID_uvw_t1_m16.csv} in the order of the \ct{MESH} lines (note that a \ct{MULT} line for the meshes may also be used).
92689268

9269-
\section{Unfreezing the Initial Flow Field}
9269+
\subsection{Unfreezing the Initial Flow Field}
92709270
\label{info:FREZ}
92719271

9272-
It may be useful to allow the solid phase to respond to an established flow field at the start of a simulation. This could be accomplished with the normal restart functionality; however, this limits the number of changes that can be made to the model before a restart is made. The \ct{UNFREEZE_TIME} parameter on the \ct{MISC} line can be used for this purpose. When set, the initial flow field is frozen with the options \ct{FREEZE_VELOCITY} and \ct{SOLID_PHASE_ONLY} set until the simulation time exceeds \ct{UNFREEZE_TIME}.
9273-
9272+
It may be useful to allow the solid phase to respond to an established flow field at the start of a simulation. This could be accomplished with the normal restart functionality; however, this limits the number of changes that can be made to the model before a restart is made. The \ct{UNFREEZE_TIME} parameter on the \ct{MISC} line can be used for this purpose. When set, the initial flow field is frozen with the options \ct{FREEZE_VELOCITY}, \ct{SOLID_PHASE_ONLY}, and \ct{LOCK_TIME_STEP} set until the simulation time exceeds \ct{UNFREEZE_TIME}. It may also be useful to set the initial time step \ct{DT} to a larger value. It may be necessary to set \ct{LIMITING_DT_RATIO} to a lower value than the default if the fixed \ct{DT} while the flow field is frozen is much larger than that calculated by the stability conditions. An example configuration with a frozen flow field is shown below.
9273+
\begin{lstlisting}
9274+
&TIME DT=1.0, T_END=120.0, LIMITING_DT_RATIO=1e-6 /
9275+
&MISC UNFREEZE_TIME=90, /
9276+
&CSVF UVWFILE ='CHID_uvw_t1_m1.csv',
9277+
TMPFILE ='CHID_tmp_t1_m1.csv',
9278+
SPECFILE='CHID_spec_t1_m1.csv' /
9279+
\end{lstlisting}
9280+
The example will read in an initial flow field using the \ct{CSVF} files, then allow the solids to heat for 90 seconds at a time step of 1 seconds (90 time steps total). The flow field will then be unfrozen for the remaining 30 seconds of simulation time.
92749281

92759282
\section{Gravity}
92769283
\label{info:GVEC}

Source/main.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ PROGRAM FDS
544544
IF (UNFREEZE_TIME > 0._EB) THEN
545545
FREEZE_VELOCITY=.TRUE.
546546
SOLID_PHASE_ONLY=.TRUE.
547+
LOCK_TIME_STEP=.TRUE.
547548
ENDIF
548549

549550
IF (MY_RANK==0 .AND. VERBOSE) CALL VERBOSE_PRINTOUT('Starting the time-stepping')
@@ -586,6 +587,16 @@ PROGRAM FDS
586587
IF ((UNFREEZE_TIME > 0._EB).AND.(T>UNFREEZE_TIME)) THEN
587588
FREEZE_VELOCITY=.FALSE.
588589
SOLID_PHASE_ONLY=.FALSE.
590+
LOCK_TIME_STEP=.FALSE.
591+
592+
UNFREEZE_DT_LOOP: DO NM=LOWER_MESH_INDEX,UPPER_MESH_INDEX
593+
CALL CHECK_STABILITY(DT,DT_NEW,T,NM)
594+
ENDDO UNFREEZE_DT_LOOP
595+
IF (N_MPI_PROCESSES>1) THEN
596+
CALL MPI_ALLGATHERV(MPI_IN_PLACE,0,MPI_DATATYPE_NULL,DT_NEW(1:NMESHES),&
597+
COUNTS,DISPLS,MPI_DOUBLE_PRECISION,MPI_COMM_WORLD,IERR)
598+
ENDIF
599+
DT = MINVAL(DT_NEW)
589600
ENDIF
590601

591602
!================================================================================================================================

Source/velo.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ MODULE VELO
1212
PRIVATE
1313

1414
PUBLIC VELOCITY_PREDICTOR,VELOCITY_CORRECTOR,NO_FLUX,BAROCLINIC_CORRECTION,MATCH_VELOCITY,MATCH_VELOCITY_FLUX,&
15-
VELOCITY_BC,COMPUTE_VISCOSITY,VISCOSITY_BC,VELOCITY_FLUX,VELOCITY_FLUX_CYLINDRICAL
15+
VELOCITY_BC,COMPUTE_VISCOSITY,VISCOSITY_BC,VELOCITY_FLUX,VELOCITY_FLUX_CYLINDRICAL,&
16+
CHECK_STABILITY
1617

1718

1819
CONTAINS

0 commit comments

Comments
 (0)