diff --git a/examples/hula/milestone.xml b/examples/hula/milestone.xml index 6c65f061..6d0750da 100644 --- a/examples/hula/milestone.xml +++ b/examples/hula/milestone.xml @@ -14,7 +14,6 @@ - diff --git a/examples/shapes/dgSquare_R0.i b/examples/shapes/dgSquare_R0.i index 8e4b5542..3c3d423e 100644 --- a/examples/shapes/dgSquare_R0.i +++ b/examples/shapes/dgSquare_R0.i @@ -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 diff --git a/examples/shapes/milestone.xml b/examples/shapes/milestone.xml index 6c65f061..6d0750da 100644 --- a/examples/shapes/milestone.xml +++ b/examples/shapes/milestone.xml @@ -14,7 +14,6 @@ - diff --git a/examples/street/milestone_aspect_ratio_smooth.xml b/examples/street/milestone_aspect_ratio_smooth.xml index 903f0df4..f45d495a 100644 --- a/examples/street/milestone_aspect_ratio_smooth.xml +++ b/examples/street/milestone_aspect_ratio_smooth.xml @@ -15,7 +15,6 @@ - diff --git a/include/user_functions/RecMixFracAuxFunction.h b/include/user_functions/RecMixFracAuxFunction.h new file mode 100644 index 00000000..ad969bff --- /dev/null +++ b/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 + +#include + +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 diff --git a/reg_tests/CTestList.cmake b/reg_tests/CTestList.cmake index f29681bb..3d49c710 100644 --- a/reg_tests/CTestList.cmake +++ b/reg_tests/CTestList.cmake @@ -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) diff --git a/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.pdf b/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.pdf index d375a8dc..e361ed16 100644 Binary files a/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.pdf and b/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.tex b/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.tex index 720e2b03..8d756cf9 100644 --- a/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.tex +++ b/reg_tests/test_files/laboratory/2d_quad4_channel/write_up/2d_quad4_channel_laboratory.tex @@ -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 @@ -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} @@ -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? diff --git a/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.pdf b/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.pdf index 48ff9493..908081ad 100644 Binary files a/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.pdf and b/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.tex b/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.tex index ad3aa98d..26f28632 100644 --- a/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.tex +++ b/reg_tests/test_files/laboratory/2d_quad9_couette/write_up/2d_quad9_couette_laboratory.tex @@ -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 @@ -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} @@ -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} } @@ -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. diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.i b/reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.i new file mode 100644 index 00000000..b8c6672c --- /dev/null +++ b/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 diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.norm.gold b/reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.norm.gold new file mode 100644 index 00000000..d6daee72 --- /dev/null +++ b/reg_tests/test_files/laboratory/2d_quad9_helium/2d_quad9_helium.norm.gold @@ -0,0 +1,100 @@ +0.1137024037042824 1 0.001 +0.02650791462418518 2 0.002 +0.04934807619023637 3 0.003 +0.02087682099826043 4 0.004 +0.02599071616809663 5 0.005 +0.01932646409819177 6 0.006 +0.02564991841687311 7 0.007 +0.02456689618402488 8 0.008 +0.0246141336824788 9 0.009 +0.02546772150794246 10 0.01 +0.02700355053278053 11 0.011 +0.02742507272146116 12 0.012 +0.02786343804913076 13 0.013 +0.02742236011764243 14 0.014 +0.02557562724614663 15 0.015 +0.02308345021288952 16 0.016 +0.0238058730528053 17 0.017 +0.0225210998035039 18 0.018 +0.02149460050309619 19 0.019 +0.0211677480033565 20 0.02 +0.02072122652304022 21 0.021 +0.02119306468439245 22 0.022 +0.02131672242559351 23 0.023 +0.02169475919481327 24 0.024 +0.02177943102071022 25 0.025 +0.02195484712568103 26 0.026 +0.02196889470452703 27 0.027 +0.02204901134433267 28 0.028 +0.02223273823430363 29 0.029 +0.02236248023839265 30 0.03 +0.02217878332032426 31 0.031 +0.02188685073805419 32 0.032 +0.02163419190079893 33 0.033 +0.02139998969041617 34 0.034 +0.02131800578206897 35 0.035 +0.02096456722137737 36 0.036 +0.02052211531073445 37 0.037 +0.02001709388730087 38 0.038 +0.01977730766081682 39 0.039 +0.01997542201936669 40 0.04 +0.01981931016595716 41 0.041 +0.02039197092063829 42 0.042 +0.02053752534618603 43 0.043 +0.02074889808699504 44 0.044 +0.02091423113461471 45 0.045 +0.02095246939787338 46 0.046 +0.02097810348738713 47 0.047 +0.02098977351027794 48 0.048 +0.02090625343316833 49 0.049 +0.02091731065781843 50 0.05 +0.02080490179568201 51 0.051 +0.02075494256657489 52 0.052 +0.02056216608010059 53 0.053 +0.02038654438704563 54 0.054 +0.02014868666930969 55 0.055 +0.0199880109387331 56 0.056 +0.01968903201222501 57 0.057 +0.0194144530095636 58 0.058 +0.0191825360756829 59 0.059 +0.01916652912802413 60 0.06 +0.01942150277471441 61 0.061 +0.01927034634564467 62 0.062 +0.01980494536833255 63 0.063 +0.01999629812459935 64 0.064 +0.02031436642308238 65 0.065 +0.02025263308794648 66 0.066 +0.02024083490634163 67 0.067 +0.0201969474438616 68 0.068 +0.02009709333240179 69 0.069 +0.02005074431132279 70 0.07 +0.02001574776544647 71 0.071 +0.02017214854843521 72 0.072 +0.02011491669210227 73 0.073 +0.02002079363308535 74 0.074 +0.0198203441949065 75 0.075 +0.01967400501900863 76 0.076 +0.0194951111207092 77 0.077 +0.01917715229626838 78 0.078 +0.01896843854200467 79 0.079 +0.01885349959156774 80 0.08 +0.01876286112555382 81 0.081 +0.01875953084371685 82 0.082 +0.01884765217203329 83 0.083 +0.01895327867773503 84 0.084 +0.01915381108036466 85 0.085 +0.01950096879305862 86 0.086 +0.01973085519664606 87 0.087 +0.01991701720038412 88 0.088 +0.02000996714091255 89 0.089 +0.02011309681543854 90 0.09 +0.01990513420048102 91 0.091 +0.01981178445783294 92 0.092 +0.01974220477474672 93 0.093 +0.01969435365697808 94 0.094 +0.01966288928542936 95 0.095 +0.01971622887007666 96 0.096 +0.01973661166608243 97 0.097 +0.01961983415558188 98 0.098 +0.01928105759629908 99 0.099 +0.01892874510547119 100 0.1 diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad4_helium.exo b/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad4_helium.exo new file mode 100644 index 00000000..c371c873 Binary files /dev/null and b/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad4_helium.exo differ diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad9_helium.exo b/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad9_helium.exo new file mode 100644 index 00000000..79cbc449 Binary files /dev/null and b/reg_tests/test_files/laboratory/2d_quad9_helium/mesh/2d_quad9_helium.exo differ diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.pdf b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.pdf new file mode 100644 index 00000000..89b1a4f0 Binary files /dev/null and b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.tex b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.tex new file mode 100644 index 00000000..15d87970 --- /dev/null +++ b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/2d_quad9_helium_laboratory.tex @@ -0,0 +1,154 @@ +\documentclass{article} + +\usepackage{graphicx} +\usepackage{subfig} +\usepackage{amsmath} + +\title{Two-dimensional Helium Plume} + +\date{} + +\begin{document} + +\maketitle + +\section{Introduction} +This case provides a description for a two-dimensional helium plume +configuration. A mixture fraction is activated that drives mixing and +buoyant effects. Although the full physics description can only be +represented by a three-dimensional domain, nevertheless, the case +captures common instabilities found in buoyant plumes such as +Rayleigh/Taylor and Kelvin/Helmholtz phenomena. The baroclinic +torque noted in the flow drives the large-scale vortical motion. For +more details on the physics of buoyant plumes and fires, +see Tieszen's seminal work in fire research~\cite{tieszenReview} and +a recent fire validation study of Domino \textit{et al.}~\cite{dominoPoF2021}. +Finally, although the plume enters into the domain as a laminar inflow +condition, there exists laminar-to-turbulent transition inspired by +the buoyant vertical acceleration. Again, a simplification of this +simulation is the under-resolved nature along with an absent turbulence model. + +\section{Domain} +The two-dimensional geometry for this tutorial is captured in +Figure~\ref{fig:geom}. Here, pure helium enters a 1 $m$ inflow boundary +that is surrounded by a bottom wall plane that is six meters in width +and five meters in height. The left and right boundaries are open boundaries +where entrainment is expected, while the top is also an open boundary +specification where flow leaves the domain. Due to complex vortical flow, +the top open boundary experiences periodic entrainment as complex structures +exit the domain. + +\begin{figure}[!htbp] + \centering + { + \includegraphics[height=2.0in]{images/2d_quad9_helium_geom.png} + } + \caption{Two-dimensional helium plume configuration. The wire diagram +outlines the quadratic Quad9 mesh and density shadings.} + \label{fig:geom} +\end{figure} + +\section{Theory} +The variable-density low-Mach equation set is defined by the continuity +and momentum equation, + +\begin{align} + \frac {\partial \rho }{\partial t} + \frac{ \partial \rho u_j}{\partial x_j} = 0. +\label{eq:contEq} +\end{align} + +\begin{align} + \frac {\partial \rho u_i }{\partial t} + \frac{ \partial \rho u_j u_i}{\partial x_j} +-\frac{\partial \sigma_{ij}}{\partial x_j} = \left( \rho - \rho^o \right) g_i. +\label{eq:momEq} +\end{align} +% +In the above equation, $\rho$ is the fluid density and $u_j$ is the +fluid velocity. The buoyancy source term is given by the difference +between the local density and reference density, $\rho^o$, scaled +by gravity, $g_i$. + +The stress tensor is provided by +\begin{align} +\sigma_{ij} = 2 \mu S^*_{ij} - P \delta_{ij}, +\end{align} +% +where the traceless rate-of-strain tensor is defined as +\begin{align} +S^*_{ij} = S_{ij} - \frac{1}{3} \delta_{ij} S_{kk} \nonumber + = S_{ij} - \frac{1}{3} \frac{\partial u_k }{\partial x_k}\delta_{ij}. +\end{align} +In a low-Mach flow, the above pressure, $P$, is the perturbation about +the thermodynamic pressure, $P^{th}$. + +For the buoyant plume configuration of interest, a transport equation +for mixture fraction is activated and defined as the mass fraction of +species that originates from the inlet boundary condition, + +\begin{align} + \frac {\partial \rho Z }{\partial t} + \frac{ \partial \rho u_j Z}{\partial x_j} ++\frac{\partial q_j }{\partial x_j} = 0, +\label{eq:zEq} +\end{align} +where the diffusive flux vector is given by $q_j = -\frac{\mu}{Sc}\frac{\partial Z}{\partial x_j}$. +Here, the Schmidt number is given as a function of density and mass +diffusivity $D$, as $Sc = \frac{\mu}{\rho D}$. Properties such as viscosity +are a linear function of mixture fraction, while density uses inverse weighting. + +\section{Results} +This simulation is based on the experimental work of O'Hern~\cite{ohern2005} +where the complex nature of a buoyant plume was studied as a precursor to +fire simulations~\cite{dominoPoF2021}. In this flow, large-scale vortical +structure is motivated by the baroclinic torque term (mis-alignment of +density and pressure gradients) that drives rotation. Rayleigh/Taylor +instabilities (bubble-spike) are captured that drives small-scale mixing. + +\subsection{Simulation Specification and Results} +The simulation activates a Quad9 topology. Inflow of helium (mixture +fraction of unity) enters the domain at 0.34 $m/s$ in the y-direction. +In Figure~\ref{fig:results}, the transient density field is provided +along with time-mean Reynolds-averaged quantities of interest. + +\begin{figure}[!htbp] + \centering + \subfloat[] + { + \includegraphics[height=1.5in]{images/2d_quad9_helium_centerline.png} + } + \caption{Density shading (left) and centerline plot of Reynolds-averaged +mixture fraction and normalized axial velocity (right).} + \label{fig:results} +\end{figure} + +\section{Discussion Points} + +There are several interesting activities associated with this sample case +including the following: + +\begin{itemize} + \item Ensure that the underlying model suite is well understood. + \item Explore the mesh and input file specifications associated + with this case. + \item Please comment on the form of the buoyancy source term and + how this drives the pressure specification in the input file. + \item Note the puffing structure and Rayleigh/Taylor instability. + \item What is a good time-averaging interval to use in this + simulation. Note that correlation-based approaches for the + temporal puffing frequency is roughly + $\frac{1.5}{\sqrt(d_o)}$. + \item Please comment on the issues with running a two-dimensional + configuration for this physics-set. What about the lack of + a turbulence model activated in the configuration? +\end{itemize} + +\begin{thebibliography}{100} + +\bibitem{tieszenReview} Tieszen, S., \emph{On the fluids mechanics of fires}, Annual Review of Fluid Mechanics, Vol. 33, 2001. + +\bibitem{dominoPoF2021} Domino, S. P., Hewson, J., Knaus, R., Hansen, M., \emph{Predicting large-scale pool fire dynamics using an unsteady flamelet- and large-eddy simulation-based model suite}, Physics of Fluids, Vol. 33, 2021. + +\bibitem{ohern2005} O'Hern, T., Weckman, E., Gerhart, A., Tiezen, S., Sheffer, R., \emph{"Experimental study of a turbulent buoyant helium plume}, Journal of Fluid Mechanics, Vol. 544, 2005. + +\end{thebibliography} + +\end{document} diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/Makefile b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/Makefile new file mode 100755 index 00000000..0aa2ba1d --- /dev/null +++ b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/Makefile @@ -0,0 +1,8 @@ + +all: + pdflatex 2d_quad9_helium_laboratory + pdflatex 2d_quad9_helium_laboratory + pdflatex 2d_quad9_helium_laboratory + +clean: + -rm -f *.aux *.log *.dvi *.bbl *.blg *~ diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_centerline.png b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_centerline.png new file mode 100644 index 00000000..8cab0dc1 Binary files /dev/null and b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_centerline.png differ diff --git a/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_geom.png b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_geom.png new file mode 100644 index 00000000..20ae3039 Binary files /dev/null and b/reg_tests/test_files/laboratory/2d_quad9_helium/write_up/images/2d_quad9_helium_geom.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.i b/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.i new file mode 100644 index 00000000..5a49ba94 --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.i @@ -0,0 +1,195 @@ +Simulation: + name: NaluSim + +linear_solvers: + + - name: solve_scalar + 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: true + muelu_xml_file_name: ../../../xml/milestone_aspect_ratio_smooth.xml + +realms: + + - name: fluidRealm + mesh: mesh/3d_hex8_dam_break.exo + use_edges: no + automatic_decomposition_type: rcb + + equation_systems: + name: theEqSys + max_iterations: 2 + + solver_system_specification: + velocity: solve_scalar + volume_of_fluid: solve_scalar + pressure: solve_cont + + systems: + + - VolumeOfFluid: + name: myV + max_iterations: 1 + convergence_tolerance: 1.e-2 + activate_smoothing: yes + fourier_number: 0.25 + smoothing_iterations: 5 + compression_constant: 0.1 + + - LowMachEOM: + name: myLowMach + max_iterations: 1 + convergence_tolerance: 1e-2 + + initial_conditions: + + - user_function: icUser + target_name: block_1 + user_function_name: + volume_of_fluid: rectangle + + - constant: ic_top + target_name: block_1 + value: + velocity: [0,0,0] + pressure: 0.0 + + material_properties: + target_name: [block_1] + + specifications: + + - name: density + type: volume_of_fluid + phase_one: 1000.0 + phase_two: 1.0 + + - name: viscosity + type: volume_of_fluid + phase_one: 1.0e-3 + phase_two: 1.98e-5 + + - name: surface_tension + type: constant + value: 0.07 + + boundary_conditions: + + - wall_boundary_condition: bc_bottom + target_name: surface_1 + wall_user_data: + velocity: [0.0,0.0,0.0] + + - wall_boundary_condition: bc_wrap + target_name: surface_2 + wall_user_data: + velocity: [0.0,0.0,0.0] + + - open_boundary_condition: bc_open + target_name: surface_3 + open_user_data: + velocity: [0.0,0.0,0.0] + pressure: 0.0 + volume_of_fluid: 0.0 + + - wall_boundary_condition: bc_front + target_name: surface_4 + wall_user_data: + velocity: [0.0,0.0,0.0] + + solution_options: + name: myOptions + + use_consolidated_solver_algorithm: yes + use_consolidated_face_elem_bc_algorithm: yes + + activate_balanced_force_algorithm: yes + activate_buoyancy_pressure_stabilization: yes + + options: + + - element_source_terms: + momentum: [lumped_momentum_time_derivative, advection_diffusion, NSO_2ND_ALT] + continuity: [vof_advection] + volume_of_fluid: [lumped_mass, scs_advection, sucv_nso, sharpen] + + - user_constants: + gravity: [0.0, 0.0, -9.81] + reference_density: 0.0 + + data_probes: + + output_frequency: 5 + + search_tolerance: 1.0e-3 + search_expansion_factor: 2.0 + + specifications: + + - name: probe_volume + from_target_part: block_1 + + line_of_site_specifications: + - name: H3_Pstab_R0 + number_of_points: 101 + tip_coordinates: [0.582, 0.0, 0.8] + tail_coordinates: [0.582, 0.0, 0.0] + + - name: H2_Pstab_R0 + number_of_points: 101 + tip_coordinates: [1.732, 0.0, 0.8] + tail_coordinates: [1.732, 0.0, 0.0] + + - name: H1_Pstab_R0 + number_of_points: 101 + tip_coordinates: [2.228, 0.0, 0.8] + tail_coordinates: [2.228, 0.0, 0.0] + + output_variables: + - field_name: volume_of_fluid + field_size: 1 + - field_name: volume_of_fluid_smoothed + field_size: 1 + + output: + output_data_base_name: output/3d_hex8_dam_break.e + output_frequency: 20 + output_node_set: no + output_variables: + - velocity + - pressure + - volume_of_fluid + - volume_of_fluid_smoothed + - interface_normal + - interface_curvature + - surface_tension + - dvofdx + - density + - viscosity + +Time_Integrators: + - StandardTimeIntegrator: + name: ti_1 + start_time: 0 + termination_time: 0.10 + time_step: 0.00250 + time_stepping_type: fixed + time_step_count: 0 + second_order_accuracy: yes + + realms: + - fluidRealm diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.norm.gold b/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.norm.gold new file mode 100644 index 00000000..d5603a6a --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/3d_hex8_dam_break.norm.gold @@ -0,0 +1,40 @@ +0.0006901171213110087 1 0.0025 +0.0004566111289355282 2 0.005 +0.0003019974368271943 3 0.0075 +0.000316187720741045 4 0.01 +0.0003217648522937028 5 0.0125 +0.0003380932741000096 6 0.015 +0.0003567165896870529 7 0.0175 +0.0003802666841993764 8 0.02 +0.0004152806389429819 9 0.0225 +0.000454173294697038 10 0.025 +0.0004725142476729445 11 0.0275 +0.0005026637946826544 12 0.03 +0.0005363198884226579 13 0.0325 +0.0005749813427184896 14 0.035 +0.0006204377746506583 15 0.0375 +0.0006790207530869784 16 0.04 +0.0007768971873418382 17 0.0425 +0.0009040661411634076 18 0.045 +0.001073203842259769 19 0.0475 +0.001320013834344647 20 0.05 +0.001606328368977194 21 0.0525 +0.001745681026356955 22 0.055 +0.001837748720065323 23 0.0575 +0.002049165445599242 24 0.06 +0.002192513987313054 25 0.0625 +0.00236601351409656 26 0.065 +0.00259986614002461 27 0.0675 +0.002805350643710005 28 0.07 +0.003010327195787636 29 0.0725 +0.002975240705973041 30 0.075 +0.003152543659758397 31 0.0775 +0.00317867849259699 32 0.08 +0.00320081154361076 33 0.0825 +0.003281129476115101 34 0.085 +0.003482416019637215 35 0.0875 +0.003750066888542728 36 0.09 +0.004023147687031184 37 0.0925 +0.004425427827539997 38 0.095 +0.004796164462735211 39 0.0975 +0.005197181982417879 40 0.1 diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/mesh/3d_hex8_dam_break.exo b/reg_tests/test_files/laboratory/3d_hex8_dam_break/mesh/3d_hex8_dam_break.exo new file mode 100644 index 00000000..19429752 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/mesh/3d_hex8_dam_break.exo differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.pdf b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.pdf new file mode 100644 index 00000000..0a985a26 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.tex b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.tex new file mode 100644 index 00000000..8b07aee6 --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/3d_hex8_dam_break_laboratory.tex @@ -0,0 +1,178 @@ +\documentclass{article} + +\usepackage{graphicx} +\usepackage{subfig} +\usepackage{amsmath} + +\newcommand{\norm}[1]{\| #1 \|} + +\title{Three-dimensional Dam Break} + +\date{} + +\begin{document} + +\maketitle + +\section{Introduction} +This case provides a description for three-dimensional dam break +use case in which a volume of fluid formulation is used in the presence +of air and water mixing. + +\section{Domain} +The three-dimensional geometry for this tutorial is captured in +Figure~\ref{fig:geom}. A tank of dimension 3.22 x 1 x 1 m in the +streamwise (x-), vertical (y-), and spanwise direction (z-direction), +respectively, includes +a rectangular obstruction (0.161 meter in height, +0.403 m in width, and 0.16 m in length) 0.6635 m from the end of the domain. +An initial block of water 0.55 m in height and 1.228 m in length +(spanning the full width of the tank) is released, ~\cite{kleefsman2005}. + +The top boundary is an open boundary in which a static +pressure is supplied. All other boundary surfaces are specified to +be a no-slip wall boundary condition. + +\begin{figure}[!htbp] + \centering + { + \includegraphics[height=2.0in]{images/3d_hex8_dam_break_geom.png} + } + \caption{Three-dimensional dam break geometry. Also shown are the experimental height probes that +are ordered from the obstruction backward, H1, H2, and H3.} + \label{fig:geom} +\end{figure} + +\section{Theory} +The air/water configuration is represented by the following set of +transport equations, + +Continuity: +\begin{align} + \frac{ \partial u_j}{\partial x_j} = 0. +\label{eq:contEq} +\end{align} + +Momentum: +\begin{align} + \frac {\partial \rho u_i }{\partial t} + \frac{ \partial \rho u_j u_i}{\partial x_j} +-\frac{\partial \sigma_{ij}}{\partial x_j} = F_i. +\label{eq:momEq} +\end{align} + +Volume of Fluid: +\begin{align} + \frac{\partial \alpha}{\partial t} + u_j \frac{ \partial \alpha }{\partial x_j} = 0. +\label{eq:contEq} +\end{align} + +% +In the above equation, $\rho$ is the fluid density, $\alpha$ is the volume of fluid, +and $u_j$ is the fluid velocity. +The stress tensor is provided by +\begin{align} +\sigma_{ij} = 2 \mu S^*_{ij} - P \delta_{ij}, +\end{align} +% +where the traceless rate-of-strain tensor is defined as +\begin{align} +S^*_{ij} = S_{ij} - \frac{1}{3} \delta_{ij} S_{kk} \nonumber + = S_{ij} - \frac{1}{3} \frac{\partial u_k }{\partial x_k}\delta_{ij}. +\end{align} +The momentum equation includes the general source term $F_i$, which contains +both gravitational, $\rho g_i$, and surface tension +effects, $\sigma \kappa \frac{\partial \alpha}{\partial x_i}$. Here, +$\sigma$ is the surface tension of the liquid and $\kappa$ is the +curvature, $\kappa = -\frac{\partial n_j}{\partial x_j}$, with the +surface normal, $n_j$, defined as, + +\begin{align} + n_j = \frac{\frac{\partial \alpha}{ \partial x_j}} {\norm{\frac{\partial \alpha}{ \partial x_j}}}, +\label{vofNorm} +\end{align} + +In a low-Mach flow, the above pressure, $P$, is the perturbation about the thermodynamic +pressure, $P^{th}$. Surface tension can also be applied in this configuration. + +Properties as a function of the volume of fluid via a linear relationship, +\begin{align} +\phi = \phi^L \alpha^L + \phi^G\left(1-\alpha \right), +\end{align} +where $\phi^L$ and $\phi^G$ are the properties at a pure liquid and gas state, respectively. Therefore, +$\alpha$ is interpreted at the volume fraction of liquid, where a value of unity implies pure liquid. +The isosurface of $1/2$ represents the diffuse interface between liquid and air. + +The underlying methodology exercises a balanced-force method for pressure stabilization +in the presence of multi-phase flow, see Francois \textit{et al.}~\cite{francois2006} and +the more recent unstructured control-volume finite element method work of Domino and +Horne~\cite{dominoHorne2022}. + +\section{Results} +We follow the numerical validation approach of Kleefsman \textit{et al.}~\cite{kleefsman2005} +where prediction of water level heights at various stations and time are provided. These +data files are available in the postP directory. + +\subsection{Simulation Specification and Results} + +The density of air and water are specified to be 1 and 1000 $kg/m^3$, respectively, +while the viscosity for air and water are 1.98e-5 and 1.0e-3 $Pa-s$, respectively. The +coarse mesh simulation exercises a Hex8 linear element. + +In Figure~\ref{fig:results}, results are provided for the specifications +provided above. + +\begin{figure}[!htbp] + \centering + { + \includegraphics[height=1.2in]{images/results_0p50sec.png} + } + \centering + { + \includegraphics[height=1.2in]{images/results_0p75sec.png} + } + \centering + { + \includegraphics[height=1.2in]{images/results_1p0sec.png} + } \\ + \centering + { + \includegraphics[height=1.2in]{images/results_2p0sec.png} + } + \centering + { + \includegraphics[height=1.2in]{images/results_3p0sec.png} + } + \centering + { + \includegraphics[height=1.2in]{images/results_4p0sec.png} + } + \caption{Volume of fluid evolution at 0.5, 0.75, 1.0, 2.0, 3.0, and 4.0 seconds.} + \label{fig:results} +\end{figure} + +\section{Discussion Points} + +There are several interesting activities associated with this sample case including +the following: + +\begin{itemize} + \item Explore the mesh and input file specifications associated with this case. + \item Replicate Figure~\ref{fig:results} using Paraview. Here, load the data set and perform a + ``clip'' based on the scalar value of volume of fluid to be one-half. + \item Probe all degree-of-freedom results, i.e., velocity and pressure. What is of interest? + \item Set the line command ``activate\_buoyancy\_pressure\_stabilization: no'', and add an + additional source term to the momentum system by the name $buoyancy$. Re-run and report + and differences. +\end{itemize} + +\begin{thebibliography}{100} + +\bibitem{kleefsman2005} Kleefsman, K., Fekken, G., Veldman, A., Iwanowski, B., and Buchner, B., \emph{A balanced-force algorithm for continuous and sharp interfacial surface tension models within a volume tracking framework}, Journal of Computational Physics, Vol. 1, pp.141-173, 2006. + +\bibitem{francois2006} Francois, M. M., Cummins, S. J., Dendy, E. D., Kothe, D. B., Sicilian, J. M., Williams, M. W., \emph{A Volume-of-Fluid based simulation method for wave impact problems}, Journal of Computational Physics, Vol. 1, pp.363-393, 2005. + +\bibitem{dominoHorne2022} Domino, S. P., Horne, W., \emph{Development and deployment of a credible unstructured, six-DOF, implicit low-Mach overset high-fidelity simulation tool for wave energy applications}, Renewable Energy, under review, 2022. + +\end{thebibliography} + +\end{document} diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/Makefile b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/Makefile new file mode 100755 index 00000000..ad612142 --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/Makefile @@ -0,0 +1,8 @@ + +all: + pdflatex 3d_hex8_dam_break_laboratory + pdflatex 3d_hex8_dam_break_laboratory + pdflatex 3d_hex8_dam_break_laboratory + +clean: + -rm -f *.aux *.log *.dvi *.bbl *.blg *~ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/3d_hex8_dam_break_geom.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/3d_hex8_dam_break_geom.png new file mode 100644 index 00000000..b792c445 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/3d_hex8_dam_break_geom.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p50sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p50sec.png new file mode 100644 index 00000000..022ee99e Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p50sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p75sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p75sec.png new file mode 100644 index 00000000..7a061306 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_0p75sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_1p0sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_1p0sec.png new file mode 100644 index 00000000..118387fd Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_1p0sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_2p0sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_2p0sec.png new file mode 100644 index 00000000..94262d8b Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_2p0sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_3p0sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_3p0sec.png new file mode 100644 index 00000000..82ca8759 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_3p0sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_4p0sec.png b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_4p0sec.png new file mode 100644 index 00000000..1e98f2b3 Binary files /dev/null and b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/images/results_4p0sec.png differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H1_exp.dat b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H1_exp.dat new file mode 100644 index 00000000..6993a69a --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H1_exp.dat @@ -0,0 +1,105 @@ +#Time Data +0.003352892 -2.22E-16 +0.35205364 -2.22E-16 +0.3755239 0.033264033 +0.40905282 0.051975053 +0.43252304 0.062370062 +0.43922883 0.07692308 +0.48281643 0.08939709 +0.5163453 0.103950106 +0.5532272 0.11642411 +0.63369656 0.12058212 +0.70746017 0.13097712 +0.78122383 0.14345114 +0.8583403 0.15384616 +0.9488684 0.16839917 +1.0092205 0.17879418 +1.052808 0.18087319 +1.1031014 0.18503119 +1.1601006 0.1933472 +1.2372171 0.19750519 +1.2875105 0.2016632 +1.3176866 0.2099792 +1.3679799 0.1954262 +1.4082146 0.2037422 +1.4518021 0.21413721 +1.4618609 0.22037423 +1.4719195 0.24116424 +1.485331 0.24740125 +1.5255657 0.23492724 +1.5356245 0.21413721 +1.5557418 0.22869022 +1.5624477 0.25155926 +1.5959765 0.25779626 +1.6295054 0.25363827 +1.676446 0.2910603 +1.6865046 0.3118503 +1.706622 0.32848233 +1.7569153 0.32848233 +1.7837385 0.34095633 +1.8239732 0.3243243 +1.8575021 0.3097713 +1.8943839 0.3014553 +1.9044425 0.28690228 +1.9279128 0.2889813 +1.954736 0.29313928 +1.9782062 0.28066528 +2.018441 0.29313928 +2.0553226 0.3035343 +2.0955575 0.2993763 +2.1190276 0.2993763 +2.1525567 0.2910603 +2.2263203 0.29313928 +2.2766135 0.29313928 +2.3336127 0.29313928 +2.3738475 0.3056133 +2.390612 0.3118503 +2.4341996 0.2972973 +2.4979045 0.28690228 +2.5616095 0.27027026 +2.638726 0.25987527 +2.6789606 0.24740125 +2.7627828 0.22661123 +2.7996647 0.23284823 +2.8600168 0.22037423 +2.9069571 0.21621622 +2.9639564 0.2037422 +3.010897 0.2037422 +3.0846605 0.2016632 +3.1450126 0.19126819 +3.285834 0.1995842 +3.349539 0.2016632 +3.44342 0.2037422 +3.564124 0.1995842 +3.627829 0.1933472 +3.7150042 0.18295218 +3.8591785 0.16424116 +3.9664712 0.14345114 +4.003353 0.13513513 +4.0804696 0.14760914 +4.2145853 0.15592515 +4.3621125 0.15384616 +4.482816 0.14553015 +4.5699916 0.14553015 +4.6303434 0.16008316 +4.673931 0.18503119 +4.7041073 0.21413721 +4.7309303 0.24740125 +4.7577534 0.26819128 +4.7979884 0.25779626 +4.8181057 0.24532224 +4.8516345 0.26195425 +4.898575 0.25779626 +4.9689856 0.25155926 +5.0159264 0.25363827 +5.0796313 0.23492724 +5.173512 0.22661123 +5.277452 0.22037423 +5.364627 0.21205822 +5.4417434 0.21621622 +5.522213 0.22037423 +5.6228 0.22037423 +5.7200336 0.22869022 +5.8139143 0.22245322 +5.914501 0.21829522 +6.0016766 0.21205822 \ No newline at end of file diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H2_exp.dat b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H2_exp.dat new file mode 100644 index 00000000..83bb1c40 --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H2_exp.dat @@ -0,0 +1,66 @@ +#Time Data +-0.003348206 0 +0.17430896 -0.001955883 +0.21448742 0.023019958 +0.23455419 0.047981862 +0.27139193 0.06671839 +0.33169335 0.085471176 +0.37523875 0.102133356 +0.43557388 0.10217517 +0.462382 0.10635174 +0.51268 0.095991604 +0.5997895 0.11892097 +0.7237855 0.1335599 +0.8310442 0.13571322 +0.9449768 0.15450318 +1.0689915 0.15874712 +1.1762502 0.16090044 +1.3304437 0.1589283 +1.4377398 0.14029166 +1.568466 0.14038226 +1.6891475 0.13422889 +1.7628903 0.13428 +1.7964324 0.12182924 +1.8935939 0.14684457 +1.9606404 0.14273304 +2.0075603 0.14692354 +2.0343273 0.17396909 +2.0644312 0.20933296 +2.0777903 0.23636921 +2.1179426 0.27589804 +2.1380055 0.30293894 +2.1815808 0.30296913 +2.2117784 0.28635806 +2.2653759 0.3051062 +2.3492534 0.26150534 +2.396203 0.24906386 +2.449793 0.27197 +2.5134802 0.27201414 +2.6476107 0.2430011 +2.7414653 0.24306613 +2.8285973 0.25352153 +2.9492862 0.24321015 +3.0833755 0.23706608 +3.2778375 0.21017385 +3.495748 0.19161385 +3.6901948 0.17303762 +3.954984 0.1815371 +4.2131066 0.169242 +4.340466 0.17764625 +4.3907113 0.19639207 +4.437575 0.23176754 +4.4609976 0.25465277 +4.4810643 0.2796147 +4.5078726 0.28379124 +4.541422 0.2671825 +4.595057 0.26514068 +4.655403 0.2589455 +4.729142 0.2610756 +4.8398056 0.23412529 +4.9806323 0.20927489 +5.1549263 0.21355367 +5.349332 0.2178464 +5.5504303 0.22838075 +5.671097 0.23054338 +5.915864 0.189133 +5.9929667 0.18502843 \ No newline at end of file diff --git a/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H3_exp.dat b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H3_exp.dat new file mode 100644 index 00000000..2c7fa983 --- /dev/null +++ b/reg_tests/test_files/laboratory/3d_hex8_dam_break/write_up/postP/H3_exp.dat @@ -0,0 +1,50 @@ +#Time Data +0.004334736 0.5499987 +0.1750374 0.5186302 +0.332336 0.48102102 +0.49964935 0.42673823 +0.74727494 0.34739968 +1.0049601 0.27638748 +1.2961385 0.211602 +1.6509665 0.1655223 +2.015858 0.12985228 +2.3238633 0.112971745 +2.5783124 0.104461715 +2.618532 0.12735043 +2.638599 0.11483651 +2.675418 0.10856094 +2.698904 0.13562794 +2.7256858 0.13352601 +2.7424493 0.14601436 +2.7559059 0.18142164 +2.7726917 0.20640996 +2.809537 0.21471769 +2.8764825 0.20425455 +2.9501543 0.21045338 +2.9769175 0.1979348 +3.050597 0.20830029 +3.137654 0.21032317 +3.2715676 0.20189685 +3.4155405 0.20179687 +3.4958825 0.19340776 +3.6299045 0.24539796 +3.6869063 0.29119167 +3.713733 0.3140897 +3.7371778 0.31824005 +3.7640347 0.3578047 +3.7908764 0.38903603 +3.8210402 0.40568173 +3.8812742 0.3868899 +3.9615529 0.34308422 +4.0619245 0.30134788 +4.182389 0.26168093 +4.3631625 0.24488875 +4.550692 0.26142517 +4.754933 0.26128334 +4.9357066 0.24449116 +5.113113 0.21728465 +5.313998 0.21297848 +5.4579825 0.21912849 +5.6354036 0.2002553 +5.8596964 0.17926623 +6.0036697 0.17916626 \ No newline at end of file diff --git a/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.pdf b/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.pdf index 17fe1182..8c27da2f 100644 Binary files a/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.pdf and b/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.tex b/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.tex index f6e5e64a..6276e33b 100644 --- a/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.tex +++ b/reg_tests/test_files/laboratory/3d_hex8_open_jet/write_up/3d_hex8_open_jet_laboratory.tex @@ -19,7 +19,7 @@ \section{Introduction} scale mixture fraction is activated; inflow velocity is a constant value absent of any profile. -\section{Theory} +\section{Domain} The three-dimensional geometry for this tutorial is captured in Figure~\ref{fig:geom}. Here, the cylindrical domain is defined by the vertical height, $H$, the outer diameter, $D_o$, and inlet pipe diameter $d_o$ and @@ -38,6 +38,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} @@ -74,7 +75,7 @@ \section{Theory} +\frac{\partial q_j }{\partial x_j} = 0, \label{eq:zEq} \end{align} -where the diffusive flux vector is given by $q_j = \frac{\mu}{Sc}\frac{\partial Z}{\partial x_j}$. +where the diffusive flux vector is given by $q_j = -\frac{\mu}{Sc}\frac{\partial Z}{\partial x_j}$. Here, the Schmidt number is given as a function of density and mass diffusivity $D$, as $Sc = \frac{\mu}{\rho D}$. @@ -103,13 +104,13 @@ \subsection{Simulation Specification and Results} are provided for the specifications provided above. \begin{figure}[!htbp] - \subfloat[] \centering + \subfloat[] { \includegraphics[height=3.0in]{images/3d_hex8_open_jet_mix_frac.png} } - \subfloat[] \centering + \subfloat[] { \includegraphics[height=3.0in]{images/3d_hex8_open_jet_umag.png} } @@ -152,7 +153,7 @@ \section{Discussion Points} \begin{itemize} \item Ensure that the underlying model suite is well understood. - \item Explore the mesh and input file associated with this case. + \item Explore the mesh and input file specifications associated with this case. \item Explore the removal of the bottom wall plane in favor of an open boudnary condition with and without total pressure specification. \item Comment on the resulting core collapse distance and the self-similar behavior. diff --git a/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.pdf b/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.pdf index 14b60c72..989abc82 100644 Binary files a/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.pdf and b/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.pdf differ diff --git a/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.tex b/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.tex index b777ba86..6520af22 100644 --- a/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.tex +++ b/reg_tests/test_files/laboratory/3d_tet4_pipe/write_up/3d_tet4_pipe_laboratory.tex @@ -18,7 +18,7 @@ \section{Introduction} This case provides a description for three-dimensional laminar pipe flow with constant properties, and a constant pressure gradient. -\section{Theory} +\section{Domain} The three-dimensional geometry for this tutorial is captured in Figure~\ref{fig:geom}. Here, the cylindrical domain is defined by the length, $L$, and pipe diameter $d_o$, respectively. @@ -37,6 +37,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. Here, in cylindrical coordinates the axial coordinate is $z$, the radial coordinate is $r$, and the azimuthal @@ -208,7 +209,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}{dz} = 2\frac{\tau_w}{r}$ 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 not zero. However, the underlying basis is a linear approach. Why are the results not exact as noted in the two-dimensional diff --git a/reg_tests/test_files/laboratory/make_them_all.sh b/reg_tests/test_files/laboratory/make_them_all.sh new file mode 100755 index 00000000..cad05780 --- /dev/null +++ b/reg_tests/test_files/laboratory/make_them_all.sh @@ -0,0 +1,29 @@ +cd 2d_quad4_channel/write_up +make all +make clean +cd ../../ + +cd 2d_quad9_couette/write_up +make all +make clean +cd ../../ + +cd 2d_quad9_helium/write_up +make all +make clean +cd ../../ + +cd 3d_hex8_dam_break/write_up +make all +make clean +cd ../../ + +cd 3d_hex8_open_jet/write_up +make all +make clean +cd ../../ + +cd 3d_tet4_pipe/write_up +make all +make clean +cd ../../ diff --git a/src/VolumeOfFluidEquationSystem.C b/src/VolumeOfFluidEquationSystem.C index f2166761..9e233eac 100644 --- a/src/VolumeOfFluidEquationSystem.C +++ b/src/VolumeOfFluidEquationSystem.C @@ -51,6 +51,7 @@ // user function #include "user_functions/RayleighTaylorMixFracAuxFunction.h" #include "user_functions/FixedHeightMixFracAuxFunction.h" +#include "user_functions/RecMixFracAuxFunction.h" #include "overset/UpdateOversetFringeAlgorithmDriver.h" @@ -742,6 +743,10 @@ VolumeOfFluidEquationSystem::register_initial_condition_fcn( // create the function theAuxFunc = new FixedHeightMixFracAuxFunction(fcnParams); } + else if ( fcnName == "rectangle" ) { + // create the function + theAuxFunc = new RecMixFracAuxFunction(); + } else { throw std::runtime_error("VolumeOfFluidEquationSystem::register_initial_condition_fcn: limited functions supported"); } diff --git a/src/user_functions/RecMixFracAuxFunction.C b/src/user_functions/RecMixFracAuxFunction.C new file mode 100644 index 00000000..f4774699 --- /dev/null +++ b/src/user_functions/RecMixFracAuxFunction.C @@ -0,0 +1,54 @@ +/*------------------------------------------------------------------------*/ +/* 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 */ +/*------------------------------------------------------------------------*/ + + +#include +#include + +// basic c++ +#include +#include +#include + +namespace sierra{ +namespace nalu{ + +RecMixFracAuxFunction::RecMixFracAuxFunction() : + AuxFunction(0,1) +{ + // nothing +} + +void +RecMixFracAuxFunction::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 +{ + for(unsigned p=0; p < numPoints; ++p) { + + const double x = coords[0]; + const double y = coords[1]; + const double z = coords[2]; + + if ( x < 1.228 && z < 0.55 ) + fieldPtr[0] = 1.0; + else + fieldPtr[0] = 0.0; + + fieldPtr += fieldSize; + coords += spatialDimension; + } +} + +} // namespace nalu +} // namespace Sierra