Skip to content

Commit

Permalink
clean-up and correct lab docs (#580)
Browse files Browse the repository at this point in the history
* added new he plume; with write_up.

* added new break sim; with write_up.

* added Rec IC for VOF.

* updated all pdfs for write ups.

* updated xml and inpout file for examples.

* modify break write up
  • Loading branch information
spdomin committed Mar 1, 2022
1 parent 58a10b8 commit be2dee8
Show file tree
Hide file tree
Showing 42 changed files with 1,229 additions and 17 deletions.
1 change: 0 additions & 1 deletion examples/hula/milestone.xml
Expand Up @@ -14,7 +14,6 @@

<Parameter name="aggregation: type" type="string" value="uncoupled"/>
<Parameter name="aggregation: drop tol" type="double" value="0.02"/>
<Parameter name="aggregation: phase2a include root" type="bool" value="false"/>
<Parameter name="repartition: enable" type="bool" value="true"/>
<Parameter name="repartition: min rows per proc" type="int" value="1000"/>
<Parameter name="repartition: start level" type="int" value="2"/>
Expand Down
2 changes: 1 addition & 1 deletion examples/shapes/dgSquare_R0.i
Expand Up @@ -25,7 +25,7 @@ linear_solvers:
realms:

- name: realm_1
mesh: mesh/square_R0.g
mesh: square_R0.g
use_edges: no
automatic_decomposition_type: rcb
Expand Down
1 change: 0 additions & 1 deletion examples/shapes/milestone.xml
Expand Up @@ -14,7 +14,6 @@

<Parameter name="aggregation: type" type="string" value="uncoupled"/>
<Parameter name="aggregation: drop tol" type="double" value="0.02"/>
<Parameter name="aggregation: phase2a include root" type="bool" value="false"/>
<Parameter name="repartition: enable" type="bool" value="true"/>
<Parameter name="repartition: min rows per proc" type="int" value="1000"/>
<Parameter name="repartition: start level" type="int" value="2"/>
Expand Down
1 change: 0 additions & 1 deletion examples/street/milestone_aspect_ratio_smooth.xml
Expand Up @@ -15,7 +15,6 @@
<Parameter name="aggregation: type" type="string" value="uncoupled"/>
<Parameter name="aggregation: drop tol" type="double" value="0.01"/>
<Parameter name="aggregation: drop scheme" type="string" value="distance laplacian"/>
<Parameter name="aggregation: phase2a include root" type="bool" value="false"/>

<Parameter name="repartition: enable" type="bool" value="true"/>
<Parameter name="repartition: min rows per proc" type="int" value="1000"/>
Expand Down
40 changes: 40 additions & 0 deletions include/user_functions/RecMixFracAuxFunction.h
@@ -0,0 +1,40 @@
/*------------------------------------------------------------------------*/
/* Copyright 2014 Sandia Corporation. */
/* This software is released under the license detailed */
/* in the file, LICENSE, which is located in the top-level Nalu */
/* directory structure */
/*------------------------------------------------------------------------*/

#ifndef RecMixFracAuxFunction_h
#define RecMixFracAuxFunction_h

#include <AuxFunction.h>

#include <vector>

namespace sierra{
namespace nalu{

class RecMixFracAuxFunction : public AuxFunction
{
public:

RecMixFracAuxFunction();

virtual ~RecMixFracAuxFunction() {}

virtual void do_evaluate(
const double * coords,
const double time,
const unsigned spatialDimension,
const unsigned numPoints,
double * fieldPtr,
const unsigned fieldSize,
const unsigned beginPos,
const unsigned endPos) const;
};

} // namespace nalu
} // namespace Sierra

#endif
2 changes: 2 additions & 0 deletions reg_tests/CTestList.cmake
Expand Up @@ -182,4 +182,6 @@ if(ENABLE_LABORATORY_TESTS)
add_test_l(2d_quad9_couette 4)
add_test_l(3d_hex8_open_jet 8)
add_test_l(3d_tet4_pipe 8)
add_test_l(3d_hex8_dam_break 8)
add_test_l(2d_quad9_helium 8)
endif(ENABLE_LABORATORY_TESTS)
Binary file not shown.
Expand Up @@ -17,7 +17,7 @@ \section{Introduction}
This case provides a description for two-dimensional channel flow
with constant properties, and a constant pressure gradient.

\section{Theory}
\section{Domain}
The two-dimensional geometry for this tutorial is captured in
Figure~\ref{fig:geom} where the rectangular domain is defined by the
height, $H$, and length, $L$. The streamwise and vertical velocity are
Expand All @@ -39,6 +39,7 @@ \section{Theory}
\label{fig:geom}
\end{figure}

\section{Theory}
The variable-density low-Mach equation set is defined by the continuity and momentum equation,

\begin{align}
Expand Down Expand Up @@ -154,7 +155,7 @@ \section{Discussion Points}
\item Ensure that derivation of Equation~\ref{eq:uMax} is clear.
\item Ensure that derivation of Equation~\ref{eq:balance} and the expression
$\frac{dP}{dx} = 2\tau_w$ is clear.
\item Explore the mesh and input file associated with this case.
\item Explore the mesh and input file specifications associated with this case.
\item In Figure~\ref{fig:results}, it is noted that the difference between
the analytical and simulation result is zero. When you run the two mesh resolutions provided,
does this finding hold? Why is this?
Expand Down
Binary file not shown.
Expand Up @@ -17,7 +17,7 @@ \section{Introduction}
This case provides a description for two-dimensional Couette flow
with constant properties, and a zero pressure gradient.

\section{Theory}
\section{Domain}
The two-dimensional geometry for this tutorial is captured in
Figure~\ref{fig:geom} where the rectangular domain is defined by the
height, $H$, and length, $L$. The streamwise and vertical velocity are
Expand All @@ -39,6 +39,7 @@ \section{Theory}
\label{fig:geom}
\end{figure}

\section{Theory}
The variable-density low-Mach equation set is defined by the continuity and momentum equation,

\begin{align}
Expand Down Expand Up @@ -113,13 +114,13 @@ \subsection{Simulation Specification and Results}
provided above.

\begin{figure}[!htbp]
\subfloat[]
\centering
\subfloat[]
{
\includegraphics[height=1.2in]{images/2d_quad9_couette_results_early.png}
}
\subfloat[]
\centering
\subfloat[]
{
\includegraphics[height=1.2in]{images/2d_quad9_couette_results_late.png}
}
Expand All @@ -134,7 +135,7 @@ \section{Discussion Points}

\begin{itemize}
\item Ensure that derivation of Equation~\ref{eq:simpleEqWithoutK} is clear.
\item Explore the mesh and input file associated with this case.
\item Explore the mesh and input file specifications associated with this case.
\item In Figure~\ref{fig:results}, the flow results demonstrate a linear profile, as
expected. Based on past experience with a linear basis, comment on the usage of a quadratic
basis.
Expand Down
177 changes: 177 additions & 0 deletions reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.i
@@ -0,0 +1,177 @@
Simulation:
name: NaluSim

linear_solvers:

- name: solve_adv_diff
type: tpetra
method: gmres
preconditioner: sgs
tolerance: 1e-5
max_iterations: 50
kspace: 50
output_level: 0

- name: solve_cont
type: tpetra
method: gmres
preconditioner: muelu
tolerance: 1e-5
max_iterations: 75
kspace: 75
output_level: 0
recompute_preconditioner: false
muelu_xml_file_name: ../../../xml/milestone_aspect_ratio_smooth.xml

realms:

- name: realm_1
mesh: mesh/2d_quad9_helium.exo
use_edges: no
automatic_decomposition_type: rcb

equation_systems:
name: theEqSys
max_iterations: 4

solver_system_specification:
velocity: solve_adv_diff
mixture_fraction: solve_adv_diff
pressure: solve_cont
dpdx: solve_adv_diff

systems:

- LowMachEOM:
name: myLowMach
max_iterations: 1
convergence_tolerance: 1e-2

- MixtureFraction:
name: myZ
max_iterations: 1
convergence_tolerance: 1.e-2
output_clipping_diagnostic: yes

initial_conditions:
- constant: ic_1
target_name: block_1
value:
pressure: 0
velocity: [0,0]
mixture_fraction: 0.0

material_properties:
target_name: block_1

specifications:

- name: density
type: mixture_fraction
primary_value: 0.163
secondary_value: 1.18

- name: viscosity
type: mixture_fraction
primary_value: 1.967e-5
secondary_value: 1.85e-5

boundary_conditions:

- inflow_boundary_condition: bc_inflow
target_name: surface_1
inflow_user_data:
velocity: [0.0,0.340,0.0]
mixture_fraction: 1.0

- wall_boundary_condition: bc_bottom
target_name: surface_2
wall_user_data:
velocity: [0,0,0]
- open_boundary_condition: bc_side
target_name: surface_3
open_user_data:
velocity: [0,0,0]
pressure: 0.0
mixture_fraction: 0.0
use_total_pressure: yes

- open_boundary_condition: bc_top
target_name: surface_4
open_user_data:
velocity: [0,0,0]
pressure: 0.0
mixture_fraction: 0.0
use_total_pressure: yes

solution_options:
name: myOptions
turbulence_model: laminar

divU_stress_scaling: 1.0
reduced_sens_cvfem_poisson: no

use_consolidated_solver_algorithm: yes
use_consolidated_face_elem_bc_algorithm: yes

options:

- laminar_schmidt:
mixture_fraction: 0.9

- turbulent_schmidt:
mixture_fraction: 1.0

- element_source_terms:
momentum: [momentum_time_derivative, advection_diffusion, buoyancy, NSO_2ND_ALT]
continuity: [density_time_derivative, advection]
mixture_fraction: [mixture_fraction_time_derivative, advection_diffusion, NSO_2ND]

- user_constants:
gravity: [0.0,-9.81,0.0]
reference_density: 1.18

- consistent_mass_matrix_png:
pressure: yes

turbulence_averaging:
time_filter_interval: 10.0
specifications:
- name: one
target_name: block_1
reynolds_averaged_variables:
- velocity
- mixture_fraction
favre_averaged_variables:
- velocity
- mixture_fraction

output:
output_data_base_name: output/2d_quad9_helium.e
output_frequency: 50
output_node_set: no
output_variables:
- velocity
- pressure
- mixture_fraction
- density
- density_ra_one
- velocity_ra_one
- velocity_fa_one
- mixture_fraction_ra_one
- mixture_fraction_fa_one

Time_Integrators:
- StandardTimeIntegrator:
name: ti_1
start_time: 0
termination_time: 0.1
time_step: 0.001
time_stepping_type: fixed
time_step_count: 0
second_order_accuracy: yes

realms:
- realm_1

0 comments on commit be2dee8

Please sign in to comment.