version 0.5.0
User Interface

The following guidelines describes the User Interface (UI).

Introduction

A NTS file is composed of 5 sections (see section 2.2 of this page):

  • domain block definition
  • grid block definition
  • modeling block definition
  • numerical parameters block definition
  • post-processing block definition

The files in test_case/doc serve as user documentation. They contain all the keywords that may be used to describe a test case. Keywords are nearly self-content but the reader can find below some comments about the grammar of the parser.

Notus file organization

Notus language specification

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# This file describes the grammar of the Notus case file
#
# A Vi/Vim/NeoVim syntax coloration file is available in tools/vim_syntax/ directory
# Fundamentals
# ============
# This is a comment line. Everything placed after the symbol '#' on the same line is ignored
# Block:
{ # This is the beginning of a block
} # This is the end of a block
# A line finishes by a semicolon
;
# Definition of variables
# =======================
# A variable is represented by an identifier (e.g. 'foo', 'bar'). Each variable has a data type and a value.
# A variable can be declared everywhere on the file. Note that the variables are scoped, that is, a variable
# defined on a block is available for its child blocks but not for its parent block.
# There are 4 data types: string, integer, double, and boolean
string s = "Notus"; # Sequence of characters enclosed in simple '' or double quotes ""
integer i = 1; # Integers
double a = 10.0; # Real numbers represented internally as a double precision.
boolean l = true; # or 'false'. Note that 'true' and 'false' are values like 1 or 2.3.
# After the declaration, a variable can be modified. For example:
a = 3.0d2; # 'a' contains 300.0
a = 2.0e1; # 'a' contains 20.0
# Expressions
# ===========
# Operators on integers and real numbers
# +, -, *, /, sqrt, ceil, floor, pow(a,b), abs, modulo(a, b), erf, erfc, exp, min(a,b), max(a,b)
# sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, atan2(a, b)
# Example:
a = b/c + c + sqrt(a) + cos(b) + pow(b,3);
# Numerical constants
a = tau # perimeter/radius ratio of a circle
b = pi # perimeter/diameter ratio of a circle
# Convert integer to string: i2s
s = i2s(41+1);
# Concatenation of strings
s = "I" + " love " + "Notus";
# Comparison operators (result is a boolean)
# <, >, <=, >=, ==, !=
# Boolean operators
# ! (not), & (and), | (or)
# Ternary operator (boolean expression) ? true : false
s = (4 < 3) ? "4 is smaller than 3" : "4 is greater than 3";
# To describe the Notus language, it is convenient to make some abstractions.
# We note in CAPITAL LETTERS the abstract classes. They are NOT Notus keywords.
# Let us start with expression classes:
INTEGER_EXPRESSION # Any expression that returns an integer value (e.g.: 1 + 4*7)
DOUBLE_EXPRESSION # Any expression that returns a real value (e.g.: cos(1.0) + 3.4d-2)
BOOLEAN_EXPRESSION # Any expression that returns a boolean value (e.g.: 3 > 4 | 1 + 1 >= 2)
STRING_EXPRESSION # Any expression that returns a string value (e.g.: "chicken.obj")
# Remarks:
# - An INTEGER_EXPRESSION is casted in a DOUBLE_EXPRESSION if required.
# - A DOUBLE_EXPRESSION is casted in an INTEGER_EXPRESSION if required.
# All of these expressions can be gathered into a more generic class
# Remarks:
# - "::=" denotes a class definition (not Notus language)
# - "|" means "or"
EXPRESSION ::= INTEGER_EXPRESSION | DOUBLE_EXPRESSION | BOOLEAN_EXPRESSION | STRING_EXPRESSION
# Named variable (no keyword is allowed)
VARIABLE_NAME
# Using these notations, we can formally define variable definitions:
integer VARIABLE_NAME = INTEGER_EXPRESSION | DOUBLE_EXPRESSION;
double VARIABLE_NAME = DOUBLE_EXPRESSION | INTEGER_EXPRESSION;
boolean VARIABLE_NAME = BOOLEAN_EXPRESSION;
string VARIABLE_NAME = STRING_EXPRESSION;
# Arrays
# ======
# An integer array is defined as
INTEGER_ARRAY ::= (INTEGER_EXPRESSION, INTEGER_EXPRESSION [, INTEGER_EXPRESSION [, ...]] )
# A double array is defined as
DOUBLE_ARRAY ::= (DOUBLE_EXPRESSION, DOUBLE_EXPRESSION [, DOUBLE_EXPRESSION [, ...]] )
# Path
# ====
# A path is defined as
# When 'std' is present, the path is relative to the *std* directory
# When 'std' is absent, the path is relative to the *case* directory
# If STRING_EXPRESSION starts with '/', the path is treated as absolute.
PATH ::= [std] STRING_EXPRESSION
# Example of a 3D array of double precision numbers
(1.0, sin(2.0), cos(1.0))
# Include a file
include PATH;
# Examples
# Include the "physical_properties.nts" file from standard library (std directory)
include std "physical_properties.nts";
# Include a file located in the case directory
include "meshes/pony.nts";
# Evaluate a string as it is a normal input.
# It can be put anywhere in the file.
eval(STRING_EXPRESSION)
# Example
# Print Hello, world! to the screen
eval("print 'Hello, world!';")
# The following expression will be evaluated as '8 + c*2 + 1'
a = eval("8" + "+" + "c") * 2 + 1;
#
# Control structures
# ==================
# Conditional control structure
if (BOOLEAN_EXPRESSION) {
# Code to execute if the condition is verified
}
else if (BOOLEAN_EXPRESSION) {
# Code to execute if the condition is verified
}
else {
# Code to execute otherwise
}
# Loop while the condition is verified
while (BOOLEAN_EXPRESSION) {
# ...
# Code to execute
# ...
exit; # Exit statement. Quit the loop prematurely
}
# Example
while (i < 10) {
# Code to execute while i < 10
if (i > n) {exit;} # Break the loop if i > n
i = i + 1;
}
# Output
# ======
# Display a message. Each argument is separated by a comma.
# Every data type is allowed.
# Remarks:
# - the brackets "[" and "]" denotes optional arguments
# - "..." denotes an infinite pattern reptition
print EXPRESSION [, EXPRESSION [, EXPRESSION ...]];
# Example
print "message", i, a, (1.0 + sqrt(5.0))/2.0, true, false;
# Export a variable in Notus. Can be accessed with the `user_variables` module.
export VARIABLE_NAME;
# Example: export the integer variable "h2g2" in Notus.
integer h2g2 = 42;
export h2g2;
# Kill Notus
# The first argument is the kill status
# The second argument is the kill message [OPTIONAL]
# The third argument is the kill value [OPTIONAL]
kill BOOLEAN_EXPRESSION [, STRING_EXPRESSION [, DOUBLE_EXPRESSION]];
# Definitions
# ===========
# 'define' blocks can be placed everywhere outside another block
# Define a fluid
# STRING_EXPRESSION is used as a reference name
define fluid STRING_EXPRESSION {
FLUID_PROPERTIES # See modeling_block.nts
}
# Define a solid
# STRING_EXPRESSION is used as a reference name
define solid STRING_EXPRESSION {
SOLID_PROPERTIES # See modeling_block.nts
}
# Define a porous medium
# STRING_EXPRESSION is used as a reference name
define porous_medium STRING_EXPRESSION {
POROUS_MEDIUM_PROPERTIES # See modeling_block.nts
}
# Define a species
# STRING_EXPRESSION is used as a reference name
define species STRING_EXPRESSION {
SPECIES_PROPERTIES # See modeling_block.nts
}
# Define a shape
# STRING_EXPRESSION is used as a reference name
define shape STRING_EXPRESSION {
# 'assume_dimension' is MANDATORY if the 'define' block is above the 'domain' block.
# 'assume_dimension' is FORBIDDEN if the 'define' block is below the 'domain' block.
assume_dimension INTEGER_EXPRESSION;
SHAPE # See shapes.nts
}
# Test if a point is inside a shape.
# Arguments:
# 1. Name of the shape. The shape must be defined using 'define'.
# 2-4. Coordinates of the point.
# 5. [OUTPUT ARGUMENT] Boolean containing the return value (boolean).
shape_is_inside(STRING_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, VARIABLE_NAME)
# Compute the shortest distance from a point to a shape.
# Arguments:
# 1. Name of the shape. The shape must be defined using 'define'.
# 2-4. Coordinates of the point.
# 5. [OUTPUT ARGUMENT] Distance (double).
# 6-8. [OPTIONAL OUTPUT ARGUMENT]: Direction.
shape_get_distance(STRING_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, VARIABLE_NAME,
[, VARIABLE_NAME, VARIABLE_NAME, VARIABLE_NAME])
# Compute the closest positive intersection between a ray and a shape.
# Arguments:
# 1. Name of the shape. The shape must be defined using 'define'.
# 2-4. Origin of the ray.
# 5-7. Direction of the ray.
# 8. [OUTPUT ARGUMENT] Number of intersections (integer).
shape_ray_trace(STRING_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION
, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION,
, VARIABLE_NAME)
# Get the distance from the origin of the ray to the intersection.
# Arguments:
# 1. Intersection number. Starts from 1.
# 2. [OUTPUT ARGUMENT] Distance from the origin of the ray to the intersection.
ray_get_distance(INTEGΕR_EXPRESSION, VARIABLE_NAME)
# Get the intersection point.
# Arguments:
# 1. Intersection number. Starts from 1.
# 2-4. [OUTPUT ARGUMENT] Coordinates of the intersection point.
ray_get_intersection(INTEGΕR_EXPRESSION, VARIABLE_NAME, VARIABLE_NAME, VARIABLE_NAME)
# Get the normal to the intersection point.
# Arguments:
# 1. Intersection number. Starts from 1.
# 2-4. [OUTPUT ARGUMENT] Coordinates of the normal to the intersection point.
ray_get_normal(INTEGΕR_EXPRESSION, VARIABLE_NAME, VARIABLE_NAME, VARIABLE_NAME)

To get exported variables in Fortran code, see user_variables.

Notus file structure

Main structure

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# This file describes the main structure of a NTS file
# See notus_language.nts to get familiar with the NTS syntax
# [OPTIONAL] System parameters
system {
# See system_block.nts
}
# Definition of the physical domain (after 'system')
domain {
# See domain_block.nts
}
# Definition of the grid (after 'domain')
grid {
# See grid_block.nts
}
# Modeling of the problem (after 'grid')
modeling {
# See modeling_block.nts
}
# Defines of the numerical methods and associated parameters (after 'modeling')
numerical_parameters {
# See numerical_parameters_block.nts
}
# Definition of the post-processing tools (after 'numerical_parameters')
post_processing {
# See post_processing_block.nts
}

System block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
system {
# [OPTIONAL] Overwrite default output directory (default: "output")
output_directory STRING_EXPRESSION;
# [OPTIONAL] Enable checkpoint
enable_checkpoint BOOLEAN_EXPRESSION;
# [OPTIONAL] Checkpoint metric (default: cpu_time)
checkpoint_metric time_iteration | cpu_time;
# [OPTIONAL] Frequency of the checkpoint (time iteration or second; default: 86000)
checkpoint_frequency INTEGER_EXPRESSION;
# [OPTIONAL] Enable checkpoint at last iteration (default: true)
enable_checkpoint_at_last_iteration BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable checkpoint of initial conditions (default: false)
enable_initial_conditions_checkpoint BOOLEAN_EXPRESSION;
# [OPTIONAL] Number of checkpoint files (default: 2)
checkpoint_max_files INTEGER_EXPRESSION;
# [OPTIONAL] Name of the checkpoint file (default: name of the input file)
checkpoint_name STRING_EXPRESSION;
# [OPTIONAL] Restart with given file (i.e.: "output/checkpoint/poiseuille_2D_1.bp")
restart PATH;
# [OPTIONAL] Measure CPU time in several parts of the code
measure_cpu_time;
# [OPTIONAL] Measure CPU time of each time iteration only
measure_time_iteration_cpu_time;
}
# Example
# =======
system {
enable_checkpoint true;
checkpoint_frequency 43200; #every 12 hours, suitable for supercomputing centers where max job time = 24h
restart "output/checkpoint/driven_cavity_3D_1.bp"
measure_time_iteration_cpu_time;
}

Domain block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
domain {
spatial_dimension 2; # or 3
# The coordinates of 2 opposite corners of the physical domain
corner_1_coordinates DOUBLE_ARRAY;
corner_2_coordinates DOUBLE_ARRAY;
# [OPTIONAL] Domain periodicity
periodicity_x;
periodicity_y;
periodicity_z;
# [OPTIONAL] Plan symmetry for left, right, etc. (@ref boundary_conditions.nts)
symmetry BOUNDARY_LOCATION;
# [OPTIONAL] Axisymmetric domain around the x axis (only)
## Constraint: the left boundary coordinate must be >= 0
## If x_left = 0 then the left (Navier) boundary is a slip
## If x_left > 0 then the left (Navier) boundary can be a slip or a wall
coordinate_system_axisymmetric;
# [OPTIONAL] Define a subdomain
subdomain STRING_EXPRESSION {
SHAPE # See shapes.nts
}
}

Grid block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
grid {
grid_type regular; # Create a regular Cartesian grid
grid_type chebyshev; # Create a Chebyshev grid
grid_type exponential; # Create an exponential grid. Require the 'expansion_ratio', 'first_step' or 'last_step' keyword
grid_type file; # Create a grid from a file. Require the 'grid_file_name' keyword
grid_type composite; # Create a grid by parts
# Required if 'grid_type' is set to 'file'
grid_file_name PATH;
# Example:
grid_file_name std "mesh/mesh_200_200";
number_of_cells INTEGER_ARRAY; # Unnecessary if 'grid_type' is set to 'file'
# ONLY ONE of the following parameters is required if 'grid_type' is set to 'exponential'
expansion_ratio DOUBLE_EXPRESSION; # Last step/first step
first_step DOUBLE_EXPRESSION; # Impose first step
last_step DOUBLE_EXPRESSION; # Impose last step
# Generate a grid by parts.
# For example:
#
# regular exponential
# <-----------x-------->
# |------------|---------| -> direction x
#
# This block defines one of the sub-grid in the direction x.
# The sub-grids are generated sequentially. For the above example,
# the regular sub-grid must be defined first, and then the exponential sub-grid.
grid_x {
grid_type regular; # Create a regular sub-grid in direction x
grid_type chebyshev; # Create a Chebyshev sub-grid in direction x
grid_type exponential; # Create an exponential sub-grid in direction x
next_bound DOUBLE_EXPRESSION; # End coordinate of the sub-grid interval
length DOUBLE_EXPRESSION; # Length of the sub-grid interval
number_of_cells INTEGER_EXPRESSION; # Number of cells of the sub-grid in direction x
# ONLY ONE of the following parameters is required if 'grid_type' is set to 'exponential'
expansion_ratio DOUBLE_EXPRESSION; # Last step/first step
first_step DOUBLE_EXPRESSION; # Impose first step
last_step DOUBLE_EXPRESSION; # Impose last step
}
# Generate a grid by parts. This block defines a sub-grid in the direction y
grid_y {
# Same parameters as block 'grid_x'
}
# Generate a grid by parts. This block defines a sub-grid in the direction z
grid_z {
# Same parameters as block 'grid_x'
}
# Number of ghost cells
# CAUTION: The value must be set carefully. It depends on the selected numerical schemes.
# Recommended values:
# 1 default value
# 2 if MOF
# 2 if VOF-PLIC
# 2 if Immersed boundary and second order Neumann b.c.
# 4 if WENO
# 4 if level-set and curvature
# The value should be set automatically in a future version of Notus
number_of_ghost_cells INTEGER_EXPRESSION;
}

Modeling block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
modeling {
# Select in this block the different materials present in the simulation.
# They may be selected in "physical_properties.nts" database, defined or modified in this block.
materials {
# Generic definition of a fluid
fluid STRING_EXPRESSION [ { FLUID_PROPERTIES } ];
# Generic definition of a solid
solid STRING_EXPRESSION [ { SOLID_PROPERTIES } ];
# Generic definition of a porous medium
porous_medium STRING_EXPRESSION [ { POROUS_MEDIUM_PROPERTIES } ];
# Definition of FLUID_PROPERTIES
fluid STRING_EXPRESSION {
density DENSITY_TYPE DOUBLE_EXPRESSION;
# DENSITY_TYPE can be either `constant` or `linear_temperature`
density constant DOUBLE_EXPRESSION; # Constant value
density linear_temperature DOUBLE_EXPRESSION; # Boussinesq
viscosity DOUBLE_EXPRESSION;
conductivity DOUBLE_EXPRESSION;
specific_heat DOUBLE_EXPRESSION;
thermal_expansion_coefficient DOUBLE_EXPRESSION;
reference_temperature DOUBLE_EXPRESSION;
}
# Definition of SOLID_PROPERTIES
solid STRING_EXPRESSION {
density DOUBLE_EXPRESSION;
conductivity DOUBLE_EXPRESSION;
specific_heat DOUBLE_EXPRESSION;
thermal_expansion_coefficient DOUBLE_EXPRESSION;
reference_temperature DOUBLE_EXPRESSION;
}
# Definition of POROUS_MEDIUM_PROPERTIES
# Porous media must be defined after the fluids
porous_medium STRING_EXPRESSION {
permeability DOUBLE_EXPRESSION;
porosity DOUBLE_EXPRESSION;
# Defines the effective properties of a porous medium saturated by a given fluid
fluid STRING_EXPRESSION { POROUS_MEDIUM_SATURATED_PROPERTIES }
# Definition of POROUS_MEDIUM_SATURATED_PROPERTIES
fluid STRING_EXPRESSION {
density constant DOUBLE_EXPRESSION; # Constant value
density linear_temperature DOUBLE_EXPRESSION; # Boussinesq
conductivity DOUBLE_EXPRESSION;
specific_heat DOUBLE_EXPRESSION;
thermal_expansion_coefficient DOUBLE_EXPRESSION;
reference_temperature DOUBLE_EXPRESSION;
}
}
# Initialize the materials in the domain.
# The initializations will be applied in the same order as they are written.
# By default, the domain is filled with the first material declared in the 'materials' block.
initial_condition {
# Replace the material behind the given shape by a given fluid
fluid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material behind the given shape by a given solid
solid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material behind the given shape by a given porous medium saturated by a given fluid.
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material inside the subdomain by a given fluid, solid or porous medium
subdomain STRING_EXPRESSION {
fluid STRING_EXPRESSION;
solid STRING_EXPRESSION;
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION;
}
}
}
# Select in this block the species to be transported by the flow (associated to species_transport equation)
# The species may be selected in "physical_properties.nts" database, defined or modified in this block.
species {
# Generic definition of a species
species STRING_EXPRESSION [ { SPECIES_PROPERTIES } ];
# Definition of SPECIES_PROPERTIES
species STRING_EXPRESSION {
reference_concentration DOUBLE_EXPRESSION;
# Properties of the species inside a given fluid
fluid STRING_EXPRESSION {
diffusion_coefficient DOUBLE_EXPRESSION;
solutal_expansion_coefficient DOUBLE_EXPRESSION;
}
# Properties of the species inside a porous medium saturated by a given fluid
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION {
diffusion_coefficient DOUBLE_EXPRESSION;
solutal_expansion_coefficient DOUBLE_EXPRESSION;
}
}
}
# Select equations to solve
equations {
navier_stokes {
# [OPTIONAL] Enable advection term (default: true)
enable_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable diffustion term (default: true)
enable_diffusion_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable div u advection term (default: true)
enable_div_u_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable temporal term (default: true)
enable_temporal_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable Brinkman term (default: false)
enable_brinkman_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable grad div term (default: false)
enable_grad_div_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Gravity term
gravity_term DOUBLE_ARRAY;
# [OPTIONAL] Driving pressure (default: false)
enable_driving_pressure BOOLEAN_EXPRESSION;
# [OPTIONAL] Source term
source_term {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Linear term
linear_term {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Project the initial velocity field onto a null divergence field and update the associated pressure (default: false)
project_initial_velocity BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable surface tension term
# Remark: Available only for two-phase flows with level-set approach, yet.
surface_tension {
coefficient DOUBLE_EXPRESSION;
}
boundary_condition {
# See boundary_conditions.nts
}
initial_condition {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Initialize from an ADIOS file
# FIELD := velocity | pressure
initialize_from_file FIELD {
# Path of the ADIOS file
file PATH;
# Variable name in the ADIOS file
variable_name STRING_EXPRESSION;
}
# [OPTIONAL] Initialize the pressure
pressure_initial_condition {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Initialize the hydrostatic pressure (default: false)
initialize_hydrostatic_pressure BOOLEAN_EXPRESSION;
# [OPTIONAL] Defines an immersed boundary for the Navier-Stokes equation for the given subdomain (see domain_block.nts)
# This block assigns the type of the boundary condition.
immersed_boundary_condition STRING_EXPRESSION {
# Immersed boundaries implements wall and inlet boundary conditions.
wall;
wall SHAPE_INITIALIZER
inlet DOUBLE_ARRAY | VECTOR_INITIALIZER
}
# [OPTIONAL] Force the pressure increment field to have some value at some fixed position.
# Useful to solve the linear system when Neumann boundary condition on pressure inc. are set on all the boundaries (u.n=0)
# See also pressure_increment_invertible_matrix_method in numerical_parameters block
impose_pressure_value {
point DOUBLE_ARRAY; # Fixed position (the closest cell center will be used)
value DOUBLE_EXPRESSION | reference_solution;
}
}
energy {
# [OPTIONAL] Enable advection term (default: true)
enable_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable diffustion term (default: true)
enable_diffusion_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable div u advection term (default: true)
enable_div_u_advection_term BOOLEAN_EXPRESSION;
boundary_condition {
# See boundary_conditions.nts
}
initial_condition {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Initialize from an ADIOS file
initialize_from_file {
# Path of the ADIOS file
file PATH;
# Variable name in the ADIOS file
variable_name STRING_EXPRESSION;
}
# [OPTIONAL] enable phase change if present
phase_change {
liquid_phase STRING_EXPRESSION; # Fluid name
solid_phase STRING_EXPRESSION; # Solid name
latent_heat DOUBLE_EXPRESSION;
melting_temperature DOUBLE_EXPRESSION;
}
# [OPTIONAL]
source_term {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Adds contact resistance between the first and the second phases
phase_thermal_resistance first_phase second_phase DOUBLE_EXPRESSION;
# [OPTIONAL]
linear_term {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Defines an immersed boundary for the energy equation for the given subdomain (see domain_block.nts)
# This block assigns the type of the boundary condition.
immersed_boundary_condition STRING_EXPRESSION {
# Either dirichlet or neumann
dirichlet DOUBLE_EXPRESSION | SCALAR_INITIALIZER
neumann DOUBLE_EXPRESSION | SCALAR_INITIALIZER
}
# [OPTIONAL] Force the temperature field to have some value at some fixed position.
impose_value {
point DOUBLE_ARRAY; # Fixed position (the closest cell center will be used)
value DOUBLE_EXPRESSION;
}
}
phase_advection {
# [OPTIONAL] Enable advection term (default: true)
enable_advection_term BOOLEAN_EXPRESSION;
# Select the materials to advect and provide boundary conditions
fluid STRING_EXPRESSION {
boundary_condition {
# See boundary_conditions.nts
}
}
solid STRING_EXPRESSION {
boundary_condition {
# See boundary_conditions.nts
}
}
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION {
boundary_condition {
# See boundary_conditions.nts
}
}
# [OPTIONAL] Impose a velocity field.
# Cannot be used if 'navier_stokes' is defined in 'modeling/equations'.
velocity_field {
VECTOR_INITIALIZER # See initializer.nts
}
}
species_transport {
# For each species, indicate initial and boundary conditions
species STRING_EXPRESSION {
initial_condition {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Initialize from an ADIOS file
initialize_from_file {
# Path of the ADIOS file
file PATH;
# Variable name in the ADIOS file
variable_name STRING_EXPRESSION;
}
boundary_condition {
# See boundary_conditions.nts
}
# [OPTIONAL]
source_term {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL]
linear_term {
SCALAR_INITIALIZER # See initializer.nts
}
#Following options apply to all species equations (to be fixed)
# [OPTIONAL] Enable advection term (default: true)
enable_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable diffustion term (default: true)
enable_diffusion_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable div u advection term (default: true)
enable_div_u_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable density based species transport form (default: false)
density_based_form BOOLEAN_EXPRESSION;
}
}
turbulence {
# k-ω SST model
# K_OMEGA_SST_FIELD := turbulent_kinetic_energy | specific_dissipation_rate
rans k_omega_sst {
# Parameters of the k-ω SST model
sst_sigma_kappa1 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.85)
sst_sigma_kappa2 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 1.0)
sst_sigma_omega1 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.5)
sst_sigma_omega2 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.856)
sst_beta1 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.075)
sst_beta2 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.0828)
sst_beta_star DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.09)
sst_gamma1 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.553166667)
sst_gamma2 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.440354667)
sst_kappa DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.41)
sst_a1 DOUBLE_EXPRESSION; # [OPTIONAL] (default: 0.31)
# [OPTIONAL] (default: constant 1.0e-8)
initial_condition K_OMEGA_SST_FIELD {
SCALAR_INITIALIZER # See initializer.nts
}
# Boundary conditions for the K_OMEGA_SST_FIELD equation.
boundary_condition K_OMEGA_SST_FIELD {
# See boundary_conditions.nts for the definition of BOUNDARY_LOCATION
# BOUNDARY_LOCATION can be followed by a boundary type or a block containing boundary types
# With a boundary type
BOUNDARY_LOCATION wall;
BOUNDARY_LOCATION inlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
BOUNDARY_LOCATION neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# With a block containing boundary types
BOUNDARY_LOCATION {
wall [ { SHAPE_INITIALIZER } ]
inlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# Apply wall boundary condition to all modifiable boundaries
wall [ { SHAPE_INITIALIZER } ]
# Apply inlet boundary condition to all modifiable boundaries
inlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# Apply Neumann boundary condition to all modifiable boundaries
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# [OPTIONAL] Defines an immersed boundary for the RANS models for the given subdomain (see domain_block.nts)
# This block assigns the type of the boundary condition.
immersed_boundary_condition STRING_EXPRESSION {
K_OMEGA_SST_FIELD {
wall [ { SHAPE_INITIALIZER } ]
inlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
}
# [OPTIONAL]
source_term K_OMEGA_SST_FIELD {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL]
linear_term K_OMEGA_SST_FIELD {
SCALAR_INITIALIZER # See initializer.nts
}
}
# v²-f model
rans v2f {
}
# LES (Large Eddy Simulation) mixed scale model
les mixed_scale {
}
}
}
}

Numerical parameters block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
numerical_parameters {
# Set the number of iteration. Cannot be used with 'final_time'.
time_iterations INTEGER_EXPRESSION;
# Set the final time. Cannot be used with 'time_iterations'.
final_time DOUBLE_EXPRESSION;
# [OPTIONAL] Final time tolerance (default: 1e-14).
# Notus stops when 'final_time - (time + time_step) <= tolerance'.
final_time_tolerance DOUBLE_EXPRESSION;
# Fixed time step
time_step fixed DOUBLE_EXPRESSION;
# Adaptative time step
time_step adaptative {
# CFL factor
cfl_factor DOUBLE_EXPRESSION;
# First time step
first_step DOUBLE_EXPRESSION;
# [OPTIONAL] Minimal time step (default: 0d0)
min_step DOUBLE_EXPRESSION;
# [OPTIONAL] Maximal time step (default: huge(1d0))
max_step DOUBLE_EXPRESSION;
# [OPTIONAL] Maximal increment between two time steps (default: huge(1d0))
max_increment DOUBLE_EXPRESSION;
# [OPTIONAL] Maximal ratio between two time steps (default: huge(1d0))
max_ratio DOUBLE_EXPRESSION;
}
# [OPTIONAL] Set initial time
initial_time DOUBLE_EXPRESSION;
time_order_discretization INTEGER_EXPRESSION; # Can be 1 or 2, 1 by default
# [OPTIONAL] Stop the simulation before the max time iteration number is all the selected test are satisfied.
stop_tests {
# [OPTIONAL] Stop if the elapsed time exceed the given time
elapsed_time DOUBLE_EXPRESSION;
# [OPTIONAL] Stop the simulation if the incompressibility criterion is small enough
incompressibility DOUBLE_EXPRESSION;
# [OPTIONAL] Stop the simulation if stationarity is achieved up to a given tolerance
stationarity_temperature DOUBLE_EXPRESSION; # [OPTIONAL]
stationarity_velocity DOUBLE_EXPRESSION; # [OPTIONAL]
stationarity_species DOUBLE_EXPRESSION; # [OPTIONAL]
stationarity_temperature_time_averaged DOUBLE_EXPRESSION; # [OPTIONAL]
stationarity_velocity_time_averaged DOUBLE_EXPRESSION; # [OPTIONAL]
stationarity_species_time_averaged DOUBLE_EXPRESSION; # [OPTIONAL]
}
# [OPTIONAL] Numerical parameters relative to materials
materials {
# [OPTIONAL] Sampling level to compute the volume fraction of the materials (default: 10)
#
# level = 1 level = 2
# ┏━━━━━━━┓ ┏━━━━━━━┓
# ┃ ┃ ┃ × × × ┃
# ┃ × ┃ ┃ × × × ┃ …
# ┃ ┃ ┃ × × × ┃
# ┗━━━━━━━┛ ┗━━━━━━━┛
#
sampling_level INTEGER_EXPRESSION;
}
# [OPTIONAL] Immersed boundary parameters common to all equations (must be placed before any equations)
# This block must be placed before any block of equations numerical parameters.
immersed_boundary STRING_EXPRESSION {
# [OPTIONAL] filter small pockets of inner domain, smaller than 4×4(×4) (default: true)
filter BOOLEAN_EXPRESSION;
# [OPTIONAL] include corners as ghost points (default: false)
use_corners BOOLEAN_EXPRESSION;
# [OPTIONAL] value of the distance below which the cell is considered outside (default: 1.0e-4)
thickness DOUBLE_EXPRESSION;
# All of the methods below are for the Linear based methods only
# [OPTIONAL] Use ghost node/point shift to maintan a maximum stencil size of 1 (SS1) (default: false)
is_ghost_node_shift BOOLEAN_EXPRESSION;
# [OPTIONAL] Use image point shift to maintan a SS1 (default: false)
is_image_point_shift BOOLEAN_EXPRESSION;
# [OPTIONAL] Use quadratic interpolation (Q) for ghost node/point value (default: false)
is_quadratic BOOLEAN_EXPRESSION;
# [OPTIONAL] Use Q with outwards shift for ghost node/point value (default: false)
is_quadratic_outshift BOOLEAN_EXPRESSION;
# [OPTIONAL] Use Q for ghost node/point value while maintainig a SS1 (default: false)
is_quadratic_ss1 BOOLEAN_EXPRESSION;
# [OPTIONAL] value of the modifier to the quadrant intersection point distance (qip) to
# maintain a maximum stencil size of 1 (default: 0.99)
# a value of 1 means we are using qip and a value between 0 and 1 mean are using a value smaller than qip
qip_distance_modifier DOUBLE_EXPRESSION;
# [OPTIONAL] value of the ratio between the distance between the image point and ghost node/point
# for a quadratic interpolation with a maximum stnecil size of 1 and the distance between the
# original/unmodifier distnace between the image point and ghost node/point (default: 0.25)
# a value of 1 means we are using original distance and a value between 0 and 1 mean are using a
# value smaller than the original distance
qip_distance_modifier DOUBLE_EXPRESSION;
# [OPTIONAL] Sampling level to compute the volume of the cells (default: 1)
#
# level = 1 level = 2
# ┏━━━━━━━┓ ┏━━━━━━━┓
# ┃ ┃ ┃ × × × ┃
# ┃ × ┃ ┃ × × × ┃ …
# ┃ ┃ ┃ × × × ┃
# ┗━━━━━━━┛ ┗━━━━━━━┛
#
sampling_level INTEGER_EXPRESSION;
# Direction (normal) computational method
direction_computational_method geometric | o2_centered;
}
navier_stokes {
# [OPTIONAL] Overwrite global time step for the Νavier-Stokes equation
time_step DOUBLE_EXPRESSION;
# [OPTIONAL] Enable velocity-pressure method (default: true)
enable_velocity_pressure_method BOOLEAN_EXPRESSION;
# [OPTIONAL] Select the coupling between the velocity and the pressure (default:goda)
# Automatically selected. Goda for multiphase flows, Timmermans for monophase flows.
velocity_pressure goda;
# [OPTIONAL] Approximation used for the pressure increment Poisson equation
# dodd : constant coefficient LHS pressure increment Poisson equation as per Dodd & Ferrante, 2014;
# A fast pressure-correction method for incompressible two-fluid flows
pressure_increment_poisson_dodd_approximation true | false; #default: false
# frantzis (experimental, use with caution): simplification of IBMs as per Frantzis & Grigoriadis, 2019;
# An efficient method for two-fluid incompressible flows appropriate for the immersed boundary method
pressure_increment_poisson_frantzis_approximation true | false; #default: false
# Approximation may not start at first time iteration
poisson_approximation_iteration_start INTEGER_EXPRESION; #default 5
# Method if pressure increment is not invertible (see also in modeling block: impose_pressure_value)
# Useful to solve the linear system when Neumann boundary condition on pressure inc. are set on all the boundaries (u.n=0)
pressure_increment_invertible_matrix_method penalization (default) | null_rhs | none
# Corner choice on which pressure increment is set to 0 (cell penalized method)
# 2D
pressure_increment_penalized_cell bottom_left_corner bottom_left_corner (default) | bottom_right_corner | top_right_corner | top_left_corner
# 3D
pressure_increment_penalized_cell back_bottom_left_corner (default) | back_bottom_right_corner | back_top_right_corner | back_top_left_corner |
front_bottom_left_corner | front_bottom_right_corner | front_top_right_corner | front_top_left_corner |
# Advection scheme
advection_scheme implicit o2_centered | o1_upwind | o2_upwind;
advection_scheme implicit hybrid_o2_centered_o2_upwind | hybrid_o2_centered_o1_upwind;
advection_scheme explicit semi_lagrangian;
# wenoX_upwind_fd are the finite differene WENO schemes of order X
advection_scheme explicit o1_upwind | o2_upwind | houc3 | houc5 | weno3 | weno5 | weno3_fd | weno5_fd {
temporal_scheme euler | ssp2_o2 | nssp2_o2 | nssp3_o2 | nssp5_o3;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting true | false;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
flux_limiter low_order | high_order | superbee | minmod | van_leer;
}
# TVD Lax-Wendroff with Superbee limiter with either operator splitting (default:lie_trotter)
# Lie-Trotter operator splitting
# Strang operator splitting
advection_scheme explicit lw_tvd_sb {
splitting_method lie_trotter | strang;
}
#[OPTIONAL] (default:implicit o2_centered)
diffusion_scheme implicit o2_centered |user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square;
#o4_centered does not currently support rectilinear grids
diffusion_scheme explicit o2_centered | o4_centered;
# Include ghost boundary cells in the linear system
navier_has_ghost_boundary_cells BOOLEAN_EXPRESSION;
# Include ghost boundary cells in the linear system
pressure_has_ghost_boundary_cells BOOLEAN_EXPRESSION;
# [OPTIONAL] Initialize the hydrostatic pressure (default: false)
initialize_hydrostatic_pressure {
# [OPTIONAL] Tolerance of the linear solver (default: 1.0e-15)
tolerance DOUBLE_EXPRESSION;
# Maximum number of iterations of the linear solver (default: 100)
max_iteration DOUBLE_EXPRESSION;
}
# [OPTIONAL] (default: false)
momentum_preserving_method BOOLEAN_EXPRESSION;
# [OPTIONAL] (default: explicit)
surface_tension explicit | semi_implicit;
# [OPTIONAL] (default: explicit)
gravity_term explicit | semi_implicit | crank_nicolson;
solver_momentum LINEAR_SOLVER # See basic_solvers.nts
solver_pressure LINEAR_SOLVER # See basic_solvers.nts
immersed_boundary STRING_EXPRESSION {
# Immersed boundary methods:
# * penalization;
# * direct (Coco & Russo, 2012), the default;
# * linear (Mittal, 2008).
# The first is for the momentum equation and the second is for the pressure
# increment equation. If only one is given, it goes to both equations.
method volume_penalization;
method lagrange_interpolation;
method lagrange_interpolation, linear;
# Interpolation order of the method
# The first is for the momentum equation and the second is for the pressure
# increment equation. If only one is given, it goes to both equations.
# Penalization is limited to first order.
order ΙΝΤΕGER_EXPRESSION [, INTEGER_EXPRESSION];
# Value to assign at outer cells
outer_value velocity DOUBLE_ARRAY;
}
}
energy {
# [OPTIONAL] Overwrite global time step for the energy equation
time_step DOUBLE_EXPRESSION;
advection_scheme implicit o2_centered | o1_upwind | o2_upwind | quick | user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square;
advection_scheme explicit semi_lagrangian;
# wenoX_upwind_fd are the finite differene WENO schemes of order X
advection_scheme explicit o1_upwind | o2_upwind | houc3 | houc5 | weno3 | weno5 | weno3_fd | weno5_fd {
temporal_scheme euler | ssp2_o2 | nssp2_o2 | nssp3_o2 | nssp5_o3;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting true | false;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
flux_limiter low_order | high_order | superbee | minmod | van_leer;
}
# TVD Lax-Wendroff with Superbee limiter with either operator splitting (default:lie_trotter)
# Lie-Trotter operator splitting
# Strang operator splitting
advection_scheme explicit lw_tvd_sb {
splitting_method lie_trotter | strang;
}
#[OPTIONAL] (default:implicit o2_centered)
diffusion_scheme implicit o2_centered | user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square ;
#o4_centered does not currently support rectilinear grids
diffusion_scheme explicit o2_centered | o4_centered;
has_ghost_boundary_cells BOOLEAN_EXPRESSION; # Include ghost boundary cells in the linear system
solver LINEAR_SOLVER # See basic_solvers.nts
# Phase change numerical parameters [OPTIONAL]
phase_change {
# Select one method
method iterative; # Iterative algorithm (Voller)
method mof; # Use MOF reconstruction
method apparent_heat_capacity; # Use Apparent heat capacity method
method phase_field; # Use Phase Field method
# Iterative algorithm parameters
relaxation_factor DOUBLE_EXPRESSION; # [OPTIONAL] Default value: 1.0
tolerance DOUBLE_EXPRESSION; # [OPTIONAL] Default: epsilon(1.0d0)
# Apparent heat capacity method
# Half-width of the temperature range of phase change.
smoother DOUBLE_EXPRESSION; # [OPTIONAL] Default: 1.0
# Phase Field parameters
phase_field {solver} # See basic_solvers.nts
energy_wall DOUBLE_EXPRESSION; # [OPTIONAL] Default: 0.5
# [OPTIONAL] Mobility parameter in the Allen-Cahn equation.
# Default: 1/thickness**2
mobility DOUBLE_EXPRESSION;
thickness DOUBLE_EXPRESSION; # [MANDATORY] Thickness parameter in the Allen-Cahn equation
# [OPTIONAL] Setting this value switches to the Isothermal model
# with the given value for undercooling energy. Otherwise,
# the undercooling energy is computed from the temperature field.
undercooling_energy DOUBLE_EXPRESSION;
}
immersed_boundary STRING_EXPRESSION {
# Immersed boundary methods:
# * penalization;
# * direct (Coco & Russo, 2012), the default;
# * linear (Mittal, 2008).
method volume_penalization;
method lagrange_interpolation;
# Interpolation order of the method (1 or 2)
# Penalization is limited to first order.
order INTEGER_EXPRESSION;
# Value to assign at outer cells
outer_value DOUBLE_EXPRESSION;
}
}
species_transport {
# [OPTIONAL] Overwrite global time step for the species transport equation
time_step DOUBLE_EXPRESSION;
advection_scheme implicit o2_centered | o1_upwind | o2_upwind | quick | user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square;
advection_scheme explicit semi_lagrangian;
# wenoX_upwind_fd are the finite differene WENO schemes of order X
advection_scheme explicit o1_upwind | o2_upwind | houc3 | houc5 | weno3 | weno5 | weno3_fd | weno5_fd {
temporal_scheme euler | ssp2_o2 | nssp2_o2 | nssp3_o2 | nssp5_o3;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting true | false;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
flux_limiter low_order | high_order | superbee | minmod | van_leer;
}
# TVD Lax-Wendroff with Superbee limiter with either operator splitting (default:lie_trotter)
# Lie-Trotter operator splitting
# Strang operator splitting
advection_scheme explicit lw_tvd_sb {
splitting_method lie_trotter | strang;
}
# [OPTIONAL] (default:implicit o2_centered)
diffusion_scheme implicit o2_centered | user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square ;
# o4_centered does not currently support rectilinear grids
diffusion_scheme explicit o2_centered | o4_centered;
solver LINEAR_SOLVER # See basic_solvers.nts
}
phase_advection {
# [OPTIONAL] Overwrite global time step for the advection equation
time_step DOUBLE_EXPRESSION;
# [OPTIONAL] Sampling level to initialize VOF and MOF (default: 10)
initial_condition_samples INTEGER_EXPRESSION;
# [OPTIONAL] Start by advecting the phases in Notus algorithm (default: false)
advect_phases_first BOOLEAN_EXPRESSION;
# Use VOF−PLIC method to advect phases
vof_plic {
# [OPTIONAL] Iteration number for volume fraction smoothing
# Note: The smoothed volume fraction is stored in a different array than volume fraction.
# It is used to compute physical quantities such as density.
smooth_volume_fraction INTEGER_EXPRESSION;
# [OPTIONAL] (default: semi_implicit)
temporal_scheme semi_implicit | crank_nicolson;
}
# Use the moment-of-fluid method to advect phases
mof {
# Tolerance value for the angle bracketting
tolerance_angle DOUBLE_EXPRESSION; # [OPTIONAL]
# Tolerance value for the derivative
tolerance_derivative DOUBLE_EXPRESSION; # [OPTIONAL]
# CFL
cfl_factor DOUBLE_EXPRESSION; # [OPTIONAL]
# Use analytic reconstruction (faster, default: true)
# Only available in 2D on Cartesian coordinates.
use_analytic_reconstruction BOOLEAN_EXPRESSION; # [OPTIONAL]
# Use symmetric reconstruction (faster, default: true)
use_symmetric_reconstruction BOOLEAN_EXPRESSION; # [OPTIONAL]
# Use filaments (default: false)
use_filaments BOOLEAN_EXPRESSION; # [OPTIONAL]
# Use filter (default: false)
use_filter BOOLEAN_EXPRESSION; # [OPTIONAL]
# Minimum volume fraction in neighborhood before filtering (default: 1e-2)
filter_threshold DOUBLE_EXPRESSION; # [OPTIONAL]
# Maximum number of filament part per phase (default: 2)
max_filaments INTEGER_EXPRESSION; # [OPTIONAL]
# Smoothing level of the volume fraction
smooth_volume_fraction INTEGER_EXPRESSION; # [OPTIONAL]
# Use the Navier boundary condition (default: true)
use_navier_boundary_condition BOOLEAN_EXPRESSION # [OPTIONAL]
}
# Use the level set method to advect phases
levelset {
# Curvature method (pick one)
curvature_method normal_divergence; # [OPTIONAL]
curvature_method closest_points; # [OPTIONAL], implies compute_closest_point
compute_closest_point; # [OPTIONAL]
# Time order discretization (pick one)
time_order_discretization INTEGER_EXPRESSION;
time_order_discretization 0; # Euler
time_order_discretization 3; # RK2 TVD
time_order_discretization -132; # NSSP 3 stages Order 2 (default)
time_order_discretization -153; # NSSP 5 stages Order 3 (rarely used)
flux_type godunov; # First order Godunov scheme (default)
flux_type lax_wendroff; # Second order Lax Wendroff (with van Leer limiter)
flux_type force; # Second order FORCE (with van Leer limiter)
flux_type flic; # Second order FLIC (with van Leer limiter)
# The limiter should always be given *after* the flux_type
flux_limiter low_order; # Low order only pass
flux_limiter high_order; # High order only pass (usualy unstable)
flux_limiter superbee; # Superbee limiter
flux_limiter minmod; # Minmod limiter
flux_limiter van_leer; # van Leer limiter
reinitialization; # Default reinitialization (see below)
reinitialization # Reinitialization with specific parameters
{
# Reinitialization method {1,2} (default: 1 for classic Eikonal equation)
method INTEGER_EXPRESSION;
# Reinitialize every N iterations (default: 10)
every INTEGER_EXPRESSION;
# The radius of the "smallest circle" allowed, in number of dx (default: 5.0)
# If the local curvature is bigger than this, do not reinitialize there.
filter DOUBLE_EXPRESSION;
# The minimum number of iterations (times the bandwidth, default: 2)
min_iteration INTEGER_EXPRESSION;
# The maximum number of iterations (times the bandwidth, default: 5)
max_iteration INTEGER_EXPRESSION;
# The minimum (relative) variation of the error between two iterations until which to stop (default: 2d-2)
threshold DOUBLE_EXPRESSION;
}
use_band; # Reduce the computations to a band around the interface
}
# Use the front-tracking method to advect phases
front_tracking {
# FIXME use keyword that are already defined : 'cfl_coefficient'
# FIXME do not use prefix, we already know that we are in the 'front_tracking' block
# FIXME do not use abbreviations: 'redistribution_order', 'redistribution_frequency'
# [OPTIONAL] CFL of advecting front
front_cfl DOUBLE_EXPRESSION;
# [OPTIONAL] Order of front redistribution
front_redist_order INTEGER_EXPRESSION;
# [OPTIONAL] Frequency of front redistribution
front_redist_frequency INTEGER_EXPRESSION;
}
}
turbulence {
# RANS_MODEL := k_omega_sst | v2f
rans RANS_MODEL {
immersed_boundary STRING_EXPRESSION {
# Immersed boundary methods:
# * penalization;
# * direct (Coco & Russo, 2012), the default;
# * linear (Mittal, 2008).
method volume_penalization;
method lagrange_interpolation;
# Interpolation order of the method (1 or 2)
# Penalization is limited to first order.
order INTEGER_EXPRESSION;
# Value to assign at outer cells
outer_value DOUBLE_EXPRESSION;
}
advection_scheme implicit o2_centered | o1_upwind | o2_upwind | quick | user_defined_stencil_1_star | user_defined_stencil_2_star | user_defined_stencil_1_square | user_defined_stencil_2_square;
advection_scheme explicit semi_lagrangian;
advection_scheme explicit o1_upwind | o2_upwind | houc3 | houc5 | weno3 | weno5 {
temporal_scheme euler | ssp2_o2 | nssp2_o2 | nssp3_o2 | nssp5_o3;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting true | false;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
flux_limiter low_order | high_order | superbee | minmod | van_leer;
}
advection_scheme explicit lw_tvd_sb {
splitting_method lie_trotter | strang;
}
has_ghost_boundary_cells BOOLEAN_EXPRESSION; # Include ghost boundary cells in the linear system
solver LINEAR_SOLVER # See basic_solvers.nts
}
les mixed_scale {
}
}
}

Post-processing block

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
post_processing {
# Output format (default: adios)
# ADIOS Schema (.bp files) is the only file format available so far.
output_library adios {
# [OPTIONAL] All the iterations will be written in a single file if true (default: false)
# Otherwise, many files will be created with the following naming convention:
#
# OUTPUT_NAME_000000.bp
# ^^^^^^
# iteration number
#
# where OUTPUT_NAME is replaced by the output name (see 'output_name' below)
single_file BOOLEAN_EXPRESSION;
}
# EnSight Gold format
output_library ensight;
# Pixie HDF5 format
output_library pixie;
# ADIOS2 format
output_library adios2;
# Xdmf format
output_library xdmf;
# Disable output
output_library none;
# [OPTIONAL] Floating-point precision
output_floating_point_precision single_precision | double_precision (default);
# [OPTIONAL] Frequency of output (default: value of 'numerical_parameters/time_iterations')
output_frequency INTEGER_EXPRESSION;
# [OPTIONAL] Output file name (default: same as .nts file without the extension)
output_name STRING_EXPRESSION;
# [OPTIONAL] Output initial conditions (default: true)
output_initial_conditions BOOLEAN_EXPRESSION;
# [OPTIONAL] Immersed boundary: remove ghost values from fields (default: true)
output_remove_ghost_values_from_fields BOOLEAN_EXPRESSION;
# [OPTIONAL] Immersed boundary: print ib points coordinates in separate txt files (default: false)
output_immersed_boundary_points BOOLEAN_EXPRESSION;
# Define a reference solution for a scalar field
# Must be put before output_field.
# SCALAR_FIELD ::= temperature | pressure
# SCALAR_FIELD ::= species_concentration STRING_EXPRESSION
# SCALAR_FIELD ::= volume_fraction STRING_EXPRESSION
reference_solution SCALAR_FIELD {
SCALAR_INITIALIZER # See initializer.nts
}
# Define a reference solution for a vector field
# Must be put before output_field.
# VECTOR_FIELD ::= velocity
reference_solution VECTOR_FIELD {
VECTOR_INITIALIZER # See initializer.nts
}
# Define a reference solution for the materials.
# By default, the domain is filled with the first material declared in the 'materials' block.
reference_solution materials {
# Replace the material behind the given shape by a given fluid.
fluid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material behind the given shape by a given solid.
solid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material behind the given shape by a given porous medium saturated by a given fluid.
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION {
SHAPE # See shapes.nts
}
# Replace the material inside the subdomain by a given fluid, solid or porous medium.
subdomain STRING_EXPRESSION {
fluid STRING_EXPRESSION;
solid STRING_EXPRESSION;
porous_medium STRING_EXPRESSION fluid STRING_EXPRESSION;
}
}
# [OPTIONAL] Definition of the criterion of the validation
#
# Defines a reference value for a given quantity.
#
# Example:
#
# tolerance 1.0e-10;
# mean volume_fraction 'air' 0.6;
#
# If the mean value of the volume fraction of the material 'air' is equal
# to 0.6 with a tolerance of 1.0e-10, the validation criterion passes.
#
# FIELD ::= velocity | pressure | temperature
# FIELD ::= species_concentration STRING_EXPRESSION | volume_fraction STRING_EXPRESSION
validation {
# [OPTIONAL] Tolerance value (default: 1.0e-10)
tolerance DOUBLE_EXPRESSION;
# [OPTIONAL] Compare the min value of the FIELD to the reference value
# Warning: DOUBLE_EXPRESSION must be enclosed in parentheses when starting with a '+' or '-' operator.
min FIELD DOUBLE_EXPRESSION;
# [OPTIONAL] Compare the max value of the FIELD to the reference value
# Warning: DOUBLE_EXPRESSION must be enclosed in parentheses when starting with a '+' or '-' operator.
max FIELD DOUBLE_EXPRESSION;
# [OPTIONAL] Compare the mean value of the FIELD to the reference value
# Warning: DOUBLE_EXPRESSION must be enclosed in parentheses when starting with a '+' or '-' operator.
mean FIELD DOUBLE_EXPRESSION;
# [OPTIONAL] Compare the FIELD to the reference FIELD (L∞ norm)
# Warning: DOUBLE_EXPRESSION must be enclosed in parentheses when starting with a '+' or '-' operator.
reference_solution_error FIELD DOUBLE_EXPRESSION;
# [OPTIONAL] Compute the area of symmetric difference and compare to the reference value
reference_solution_area_of_symmetric_difference DOUBLE_EXPRESSION;
}
# [OPTIONAL] statistics (compute time averaged fields, field fluctuations, field rms)
statistics {
start_time DOUBLE_EXPRESSION;
compute_time_averaged_fields velocity, pressure, temperature, species_concentration, tke_dissipation_rate, mixing_time;
compute_fluctuation_fields velocity, pressure, temperature, species_concentration;
compute_rms_fields velocity, pressure, temperature, species_concentration;
}
# [OPTIONAL] add a set of probe points. Many 'probe_point' blocks can be defined.
probe_point {
# [OPTIONAL] Output name (Default: OUTPUT_NAME_probe_point_PROBE_INDEX)
output_name STRING_EXPRESSION;
# [OPTIONAL] Output frequency (default: 1)
output_frequency INTEGER_EXPRESSION;
# Define as many point as required (at least one)
# Add a probe point using coordinates
point DOUBLE_ARRAY;
# Add a probe point using the coordinates of a cell
point cell INTEGER_ARRAY;
# Add a probe point using the coordinates of a face
point face_u INTEGER_ARRAY;
point face_v INTEGER_ARRAY;
point face_w INTEGER_ARRAY;
# Fields to output
output_fields OUTPUT_FIELD [, OUTPUT_FIELD , [...]];
}
# [OPTIONAL] add a probe line. Many 'probe_line' blocks can be defined.
probe_line {
# [OPTIONAL] Output name (Default: OUTPUT_NAME_probe_line_PROBE_INDEX)
output_name STRING_EXPRESSION;
# [OPTIONAL] Output frequency (default: 1)
output_frequency INTEGER_EXPRESSION;
# Definition of the line segment (only one line segment is accepted)
# Define the line segment by the coordinates of its end points
line_segment DOUBLE_ARRAY, DOUBLE_ARRAY;
# Define the number of samples (only when the line segment is defined by the coordinates)
samples INTEGER_EXPRESSION;
# Axis-aligned line segments
# Define the line segment by the coordinates of the cell of its end points (must be axis-aligned)
line_segment cell INTEGER_ARRAY, INTEGER_ARRAY;
# Define the line segment by the coordinates of the face of its end points (must be axis-aligned)
line_segment face_u INTEGER_ARRAY, INTEGER_ARRAY;
line_segment face_v INTEGER_ARRAY, INTEGER_ARRAY;
line_segment face_w INTEGER_ARRAY, INTEGER_ARRAY;
# Define the line segment by its direction and its coordinates in the orthogonal direction.
# The number of samples is equal to the number of nodes depending on
# the node type (cell, face_u, face_v, or face_w).
line_segment_x [cell | face_u | face_v | face_w] DOUBLE_EXPRESSION | DOUBLE_ARRAY;
line_segment_y [cell | face_u | face_v | face_w] DOUBLE_EXPRESSION | DOUBLE_ARRAY;
line_segment_z [cell | face_u | face_v | face_w] DOUBLE_ARRAY;
# Fields to output
output_fields OUTPUT_FIELD [, OUTPUT_FIELD , [...]];
}
# Select the fields to print. Multiple occurence of 'output_fields' are cummulative.
#
# Immersed boundary variables
# ---------------------------
# OUTPUT_FIELD ::= ib_direction | ib_distance | ib_surface
#
# Material properties
# -------------------
# OUTPUT_FIELD ::= conductivity | density | specific_heat | viscosity
#
# Navier-Stokes related variables
# -------------------------------
# OUTPUT_FIELD ::= divergence | divergence_predicted
# OUTPUT_FIELD ::= pressure | pressure_gradient | pressure_increment
# OUTPUT_FIELD ::= velocity | velocity_predicted
# OUTPUT_FIELD ::= permeability
# OUTPUT_FIELD ::= navier_stokes_linear_term | navier_stokes_source_term
# OUTPUT_FIELD ::= density_gravity_term
#
# Multiphase variables
# --------------------
# OUTPUT_FIELD ::= volume_fraction
# MOF related variables:
# OUTPUT_FIELD ::= centroids | mof_phases
# Levelset related variables:
# OUTPUT_FIELD ::= interface_closest_points | interface_curvature | interface_normal | levelset_function
#
# Species variables
# -----------------
# OUTPUT_FIELD ::= species_concentration | species_diffusion_coefficient
#
# Energy variables
# ----------------
# OUTPUT_FIELD ::= energy_source_term | temperature
# Turbulence variables
# ----------------
# OUTPUT_FIELD ::= turbulent_kinetic_energy
# OUTPUT_FIELD ::= specific_dissipation_rate
# OUTPUT_FIELD ::= wall_distance
# OUTPUT_FIELD ::= turbulent_viscosity
#
# Post-processing variables
# -------------------------
# OUTPUT_FIELD ::= grid_volume | output_fields local_domain_rank
# OUTPUT_FIELD ::= q_criterion | strain_rate_magnitude | vorticity | lagrangian_acceleration
# OUTPUT_FIELD ::= micro_mixing_time | tke_dissipation_rate
#
# Statistics
# ----------
# OUTPUT_FIELD ::= pressure_fluctuation | species_concentration_fluctuation | temperature_fluctuation | velocity_fluctuation
# OUTPUT_FIELD ::= pressure_rms | species_concentration_rms | temperature_rms | velocity_rms
# OUTPUT_FIELD ::= pressure_time_averaged | species_concentration_time_averaged | temperature_time_averaged | velocity_time_averaged
# OUTPUT_FIELD ::= tke_disspiation_rate_time_averaged | micro_mixing_time_time_averaged
#
# Validation/verification variables
# ---------------------------------
# OUTPUT_FIELD ::= reference_solution FIELD
# OUTPUT_FIELD ::= reference_solution_error FIELD
# FIELD ::= velocity | pressure | temperature
# FIELD ::= species_concentration STRING_EXPRESSION | volume_fraction STRING_EXPRESSION
output_fields OUTPUT_FIELD [, OUTPUT_FIELD [, ...]];
# [OPTIONAL] Diagnostic quantities computation
#
# QUANTITY ::= mean_kinetic_energy | kinetic_energy_integral
# QUANTITY ::= nusselt_number | sherwood_number
# QUANTITY ::= wall_shear_stress | wall_shear_velocity | wall_skin_friction_coef
# QUANTITY ::= wall_shear_stress_time_averaged | wall_shear_velocity_time_averaged | wall_skin_friction_coef_time_averaged
# QUANTITY ::= domain_volume EQUATION
# QUANTITY ::= min FIELD
# QUANTITY ::= max FIELD
# QUANTITY ::= mean FIELD
# QUANTITY ::= micro_mixing_time
# QUANTITY ::= phases_volume_loss
# QUANTITY ::= materials_volume_loss
# QUANTITY ::= reference_solution_error FIELD
# QUANTITY ::= reference_solution_area_of_symmetric_difference
# QUANTITY ::= tke_dissipation_rate
# QUANTITY ::= immersed_boundary_surface | immersed_boundary_drag_lift | immersed_boundary_nusselt_number
#
# EQUATION ::= energy | navier_stokes | phase_advection | species_transport
# FIELD ::= velocity | pressure | temperature
# FIELD ::= species_concentration STRING_EXPRESSION | volume_fraction STRING_EXPRESSION
diagnostic_quantities QUANTITY [, QUANTITY [, ...]];
# [OPTIONAL] automatically set to true by notus_grid_convergence (script)
enable_grid_convergence BOOLEAN_EXPRESSION;
# [DO NOT USE] indicate to which file grid_convergence
# quantities must be written. It is automatically set
# by notus_grid_convergence.
grid_convergence_file STRING_EXPRESSION;
# [OPTIONAL] Quantities to use for grid convergence
#
# QUANTITY ::= mean_kinetic_energy | kinetic_energy_integral
# QUANTITY ::= nusselt_number | sherwood_number
# QUANTITY ::= wall_shear_stress | wall_shear_velocity | wall_skin_friction_coef
# QUANTITY ::= wall_shear_stress_time_averaged | wall_shear_velocity_time_averaged | wall_skin_friction_coef_time_averaged
# QUANTITY ::= domain_volume EQUATION
# QUANTITY ::= min FIELD
# QUANTITY ::= max FIELD
# QUANTITY ::= mean FIELD
# QUANTITY ::= reference_solution_error FIELD
# QUANTITY ::= reference_solution_area_of_symmetric_difference
#
# EQUATION ::= energy | navier_stokes | phase_advection | species_transport
# FIELD ::= velocity | pressure | temperature
# FIELD ::= species_concentration STRING_EXPRESSION | volume_fraction STRING_EXPRESSION
grid_convergence_quantities QUANTITY [, QUANTITY [, ...]];
# [OPTIONAL] Print debug information
debug_io matrix, fields;
}

Notus specific groups

Basic solvers

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# Available basic solver list:
# - hypre_bicgstab
# - hypre_gmres
# - mumps_metis
# - lis_bi*
# - lis_*gmres
# Defines LINEAR_SOLVER
# See advanced_solversDOUBLE_EXPRESSIONnts for advanced parameters
# Hypre BiCGStab
solver hypre_bicgstab {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
initial_preconditioner left_jacobi; # [OPTIONAL]
absolute_tolerance; # [OPTIONAL]
# Available optional preconditioners:
# - parasails
# - euclid
# - pilut
# - boomeramg
preconditioner parasails {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
threshold DOUBLE_EXPRESSION;
levels INTEGER_EXPRESSION;
filter DOUBLE_EXPRESSION;
slip INTEGER_EXPRESSION;
}
preconditioner euclid {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
}
preconditioner pilut {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
drop_tolerance DOUBLE_EXPRESSION;
factor_row_size INTEGER_EXPRESSION;
}
preconditioner boomeramg {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
strong_threshold DOUBLE_EXPRESSION;
coarsen_type INTEGER_EXPRESSION;
aggressive_coarsening_level INTEGER_EXPRESSION;
interpolation_type INTEGER_EXPRESSION;
post_interpolation_type INTEGER_EXPRESSION;
relaxation_type INTEGER_EXPRESSION;
}
}
# Hypre GMRES
solver hypre_gmres {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
initial_preconditioner left_jacobi; # [OPTIONAL]
absolute_tolerance; # [OPTIONAL]
max_krylov_dimension INTEGER_EXPRESSION; # [OPTIONAL]
# Available optional preconditioners:
preconditioner parasails {}
preconditioner euclid {}
preconditioner pilut {}
preconditioner boomeramg {}
}
# Notus BiCGStab Solver
solver notus_bicgstab {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
initial_preconditioner left_jacobi; # [OPTIONAL]
}
# MUMPS Metis
solver mumps_metis {}
# LIS solvers
#solver lis_bicgsafe {
#solver lis_bicrstab {
#solver lis_bicrsafe {
solver lis_bicgstab {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
initial_preconditioner left_jacobi; # [OPTIONAL]
preconditioner iluk {
fill_level INTEGER_EXPRESSION; # default 0
}
preconditioner iluc {
drop_tolerance DOUBLE_EXPRESSION; # default 0.05
rate DOUBLE_EXPRESSION; # default 5
}
preconditioner ilut {
drop_tolerance DOUBLE_EXPRESSION; # default 0.05
rate DOUBLE_EXPRESSION; # default 5
}
}
solver lis_bicgstab_l {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
l_degree INTEGER_EXPRESSION; # default 2
initial_preconditioner left_jacobi; # [OPTIONAL]
# Available optional preconditioners (see below):
preconditioner iluc {}
preconditioner iluk {}
preconditioner ilut {}
}
#solver lis_fgmres {
solver lis_gmres {
max_iteration INTEGER_EXPRESSION;
tolerance DOUBLE_EXPRESSION;
restart_value INTEGER_EXPRESSION; #default 40
initial_preconditioner left_jacobi; # [OPTIONAL]
# Available optional preconditioners (see below):
preconditioner iluc {}
preconditioner iluk {}
preconditioner ilut {}
}

Boundary conditions

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# Generic definition
# ==================
# The boundary conditions are set in the `boundary_condition` block
boundary_condition {
BOUNDARY_LOCATION BOUNDARY_CONDITION
[BOUNDARY_LOCATION BOUNDARY_CONDITION]
...
[BOUNDARY_LOCATION BOUNDARY_CONDITION]
}
# BOUNDARY_LOCATION is 1 of the 6 following keywords: `left`, `right`, `bottom`, `top`, `back`, `front`
#
# Remarks:
# - Each of theses keywords must appear at least once (except for phase advection)
# - `back` and `front` are available only in 3D
# - In case of a periodic domain, some keywords are forbidden:
# * `left` and `right` are forbidden with periodicity along x-axis
# * `bottom` and `top` are forbidden with periodicity along y-axis
# * `back` and `front` are forbidden with periodicity along z-axis
# - In case of symmetry plans, the associated boundary locations are forbidden.
# - BOUNDARY_CONDITION can be either a block or a keyword and is equation dependent.
# - "modifiable boundaries" refers to non periodic nor symmetric boundaries
boundary_condition {
left BOUNDARY_CONDITITION
right BOUNDARY_CONDITITION
bottom BOUNDARY_CONDITITION
top BOUNDARY_CONDITITION
back BOUNDARY_CONDITITION
front BOUNDARY_CONDITITION
}
# Energy equation
# ===============
# BOUNDARY_CONDITION is one of the following keywords: `dirichlet` or `neumann`
boundary_condition {
# BOUNDARY_LOCATION can be followed by a boundary type or a block containing boundary types
# With a boundary type
BOUNDARY_LOCATION dirichlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
BOUNDARY_LOCATION neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# Robin boundary condition
# Defines 3 coefficients (g, α, β) such that:
#
# g = α grad Τ·n + β T
#
# Where n is the outer normal of the boundary and T is the temperature.
BOUNDARY_LOCATION robin DOUBLE_ARRAY | { VECTOR_INITIALIZER };
# With a block containing boundary types
BOUNDARY_LOCATION {
dirichet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# Apply Dirichlet boundary condition to all modifiable boundaries
dirichlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# Apply Neumann boundary condition to all modifiable boundaries
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# Energy equation and species transport
# =====================================
# BOUNDARY_CONDITION is one of the following keywords: `dirichlet` or `neumann`
boundary_condition {
# BOUNDARY_LOCATION can be followed by a boundary type or a block containing boundary types
# With a boundary type
BOUNDARY_LOCATION dirichlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
BOUNDARY_LOCATION neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# With a block containing boundary types
BOUNDARY_LOCATION {
dirichet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# Apply Dirichlet boundary condition to all modifiable boundaries
dirichlet DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
# Apply Neumann boundary condition to all modifiable boundaries
neumann DOUBLE_EXPRESSION | { SCALAR_INITIALIZER };
}
# Navier-Stokes equation
# ======================
# BOUNDARY_CONDITION is one of the following keywords: `wall`, `inlet`, `moving`, `neumann` or `slip`
boundary_condition {
# BOUNDARY_LOCATION can be followed by a boundary type or a block containing boundary types
# With a boundary type
BOUNDARY_LOCATION wall [ { SHAPE_INITIALIZER } ]
BOUNDARY_LOCATION neumann [ { SHAPE_INITIALIZER } ]
BOUNDARY_LOCATION slip [ { SHAPE_INITIALIZER } ]
BOUNDARY_LOCATION inlet DOUBLE_ARRAY | { VECTOR_INITIALIZER };
BOUNDARY_LOCATION moving DOUBLE_EXPRESSION | { SCALAR_INITIALIZER }; # 2D
BOUNDARY_LOCATION moving DOUBLE_ARRAY | { VECTOR_INITIALIZER }; # 3D. Attention: it requires 2D (sic) arrays.
# With a block containing boundary types
BOUNDARY_LOCATION {
wall [ { SHAPE_INITIALIZER } ]
neumann [ { SHAPE_INITIALIZER } ]
slip [ { SHAPE_INITIALIZER } ]
inlet DOUBLE_ARRAY | { VECTOR_INITIALIZER };
moving DOUBLE_EXPRESSION | { SCALAR_INITIALIZER }; # 2D
moving DOUBLE_ARRAY | { VECTOR_INITIALIZER }; # 3D. Attention: it requires 2D (sic) arrays.
}
# Apply wall boundary condition to all modifiable boundaries
wall [ { SHAPE_INITIALIZER } ]
# Apply Neumann boundary condition to all modifiable boundaries
neumann [ { SHAPE_INITIALIZER } ]
# Apply slip boundary condition to all modifiable boundaries
slip [ { SHAPE_INITIALIZER } ]
# Apply inlet boundary condition to all modifiable boundaries
inlet DOUBLE_ARRAY | { VECTOR_INITIALIZER };
# Apply moving boundary condition to all modifiable boundaries
moving DOUBLE_ARRAY | { VECTOR_INITIALIZER }; # 2D
moving DOUBLE_ARRAY | { VECTOR_INITIALIZER }; # 3D. Attention: it requires 2D (sic) arrays.
}
# Phase advection
# ===============
# The only available BOUNDARY_CONDITION is `inlet`
# Remark: the default boundary condition is a free condition
boundary_condition {
BOUNDARY_LOCATION inlet BOOLEAN_EXPRESSION | { SHAPE_INITIALIZER };
# Apply inlet boundary condition to all boundaries
inlet BOOLEAN_EXPRESSION | { SHAPE_INITIALIZER };
}

Initializer

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# Generic definition
# ==================
# Initializers can initialize scalar and vector fields
# There are 3 kinds of initializer: SCALAR_INITIALIZER, VECTOR_INITIALIZER and SHAPE_INITIALIZER
#
# There are 4 categories of initializer that can be used in combination:
# - constant value
# - instructions
# - constant value in a shape
# - instructions in a shape
# Scalar initializer block
{
SCALAR_INITIALIZER
[SCALAR_INITIALIZER]
...
[SCALAR_INITIALIZER]
}
# Vector initializer block
{
VECTOR_INITIALIZER
[VECTOR_INITIALIZER]
...
[VECTOR_INITIALIZER]
}
# Shape initializer block
{
SHAPE # see shapes.nts
}
# SCALAR_INITIALIZER and VECTOR_INITIALIZER shares the same syntax.
# Constant initializer
#
# Initialize a field with a constant value
# VALUE can be a DOUBLE_EXPRESSION or a DOUBLE_ARRAY (see notus_language.nts)
constant VALUE
# Instructions initializer
#
# Initialize a field with a series of instructions
# INSTRUCTIONS are defined below
instructions { INSTRUCTIONS }
# Shaped constant initializer
#
# VALUE can be a DOUBLE_EXPRESSION or a DOUBLE_ARRAY (see notus_language.nts)
# SHAPES are defined in shapes.nts
shape VALUE { SHAPES }
# Shaped instructions initializer
#
# Initialize a field with instructions in a shape
# SHAPES are defined in shapes.nts
# INSTRUCTIONS are defined below
shaped_instructions {
shape { SHAPES }
instructions { INSTRUCTIONS }
}
# INSTRUCTIONS definition
# =======================
# Initialize a field with a series of instructions.
#
# Features:
# - all keywords and variables start with a @
# - variable declaration: 3 data types: @double, @integer and @boolean
# - special variables: @x, @y, @z, and @t
# - @if, @elseif, @else structures
# - @while, @exit structures
# - use @return to return a value
instructions {
# Declare a double variable `@toto`
@double @toto = @x + @y;
# `@if` ... `@elseif` ... `@else` ...
@if (@toto > 3.0d0) {
# Return the double value 4.0 (SCALAR_INITIALIZER)
@return 4.0d0;
# Another example for a VECTOR_INITIALIZER
@return (4.0d0, 2.0d0*@x);
# Remark: If no return value is given, the field is not affected
} @elseif (@toto > 2.0d0) {
@return toto;
} @else {
# Declare an integer variable
# Note that it is scoped in @else block
@integer @i = 1;
# `@while` loop construction
@while (@i < 42) {
@toto = @toto + 1.72;
# Use `@exit` keyword to quit the loop prematurely
@if (@toto > 17.4} {@exit;}
@i = @i + 1;
}
@return 7.0d0*@i;
}
}
# Examples
# ========
# Initialize a scalar field with 1.0 everywhere except in a circle where it is initialized
# with the expression x(1-x) + y(1-y) everywhere
{
# Initialize at 1.0 everywhere
constant 1.0;
# Initialize the scalar field x(1-x) + y(1-y) inside a circle of radius 0.5 centered at (0,0)
shaped_instructions {
shape {
circle {radius 0.5; center (0.0, 0.0);}
}
instructions {
@return @x*(1.0 - @x) + @y*(1.0 - @y);
}
}
}
# The above scalar initializer can be written with instructions only
# Instructions are the slowest initializer. For better performances, prefer the
# use of `constant` or `shaped_instructions` to minimize the computational cost.
{
instructions {
@if (@x*@x + @y*@y < 0.5*0.5) {
@return @x*(1.0 - @x) + @y*(1.0 - @y);
} @else {
@return 1.0;
}
}
}
# Initialize a vector field with (0.0, 0.0) everywhere except in a unit square where it is
# initialized with (1.0, 1.0)
{
# Initialize the vector field with (0.0, 0.0) everywhere
constant (0.0, 0.0);
# Initialize the vector field with (1.0, 1.0) in a unit square centered at the origin
shape (1.0, 1.0) {
rectangle {corner_1_coordinates (-0.5, -0.5); corner_2_coordinates (0.5, 0.5);}
}
}

Shapes

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# Generic definition of a complex shape
# =====================================
# Features:
# - use CSG (Constructive Solid Geometry): union, intersection, and difference
# - manage transformations: translation, rotation, scale, and inverse
# - Many shapes are supported: sphere, rectangular cuboid, surface meshes, etc.
# If many shapes are declared sequentially, the final shape will be the union of the shapes
SHAPE ::= CSG_SHAPE | BASIC_SHAPE | TRANSFORMATION
# CSG shapes
# ==========
CSG_SHAPE ::= union {...}
| difference {...}
| intersection {...}
# Union block (default block if not present)
union { SHAPE [SHAPE] ...}
# Difference of shapes
difference { SHAPE [SHAPE] ...}
# Intersection of shapes
intersection { SHAPE [SHAPE] ...}
# Basic shapes
# ============
BASIC_SHAPE ::= polygon {...}
| surface_mesh {...}
| circle {...}
| sphere {...}
| rectangle {...}
| cuboid {...}
| cylinder {...}
| torus {...}
| shape {...}
# 2D shapes
# ---------
circle {
center DOUBLE_ARRAY;
radius DOUBLE_EXPRESSION;
TRANSFORMATION # [OPTIONAL]
}
rectangle {
corner_1_coordinates DOUBLE_ARRAY;
corner_2_coordinates DOUBLE_ARRAY;
TRANSFORMATION # [OPTIONAL]
}
# Any polygon (even self-intersecting!)
polygon {
odd_even_rule BOOLEAN_EXPRESSION; # [OPTIONAL]. Default: true
# Vertices of the polygon define in the counter-clockwise order
point DOUBLE_ARRAY;
...
point DOUBLE_ARRAY;
# Example: triangle
point (0.0, 1.0);
point (1.0, 1.0);
point (0.5, 0.5);
TRANSFORMATION # [OPTIONAL]
}
half_space {
center DOUBLE_ARRAY;
normal DOUBLE_ARRAY;
TRANSFORMATION # [OPTIONAL]
}
# 3D shapes
# ---------
sphere {
center DOUBLE_ARRAY;
radius DOUBLE_EXPRESSION;
TRANSFORMATION # [OPTIONAL]
}
cuboid {
corner_1_coordinates DOUBLE_ARRAY;
corner_2_coordinates DOUBLE_ARRAY;
TRANSFORMATION # [OPTIONAL]
}
# Surface mesh with convex polygonal faces
surface_mesh {
# OBJ Wavefront is the only supported format (yet)
file PATH;
TRANSFORMATION # [OPTIONAL]
}
cylinder {
center DOUBLE_ARRAY;
axis DOUBLE_ARRAY;
radius DOUBLE_EXPRESSION;
TRANSFORMATION # [OPTIONAL]
}
torus {
center DOUBLE_ARRAY;
axis DOUBLE_ARRAY;
big_radius DOUBLE_EXPRESSION;
small_radius DOUBLE_EXPRESSION;
TRANSFORMATION # [OPTIONAL]
}
half_space {
center DOUBLE_ARRAY;
normal DOUBLE_ARRAY;
TRANSFORMATION # [OPTIONAL]
}
# Use a shape defined in a 'define' block
# First form:
shape STRING_EXPRESSION;
# Second form:
shape STRING_EXPRESSION {
TRANSFORMATION # [OPTIONAL]
}
# Shapes for boundary conditions
# ==============================
The shapes devoted to the boundary conditions depends on the BOUNDARY_LOCATION (see boundary_conditions.nts).
BC_SHAPE ::= line_segment {...}
| rectangle {...}
| circle {...}
| BASIC_SHAPE
# 2D shapes
# ---------
# Define a line segment on the boundary BOUNDARY_LOCATION.
line_segment {
# Define the end-points of the line segment.
coordinates DOUBLE_EXPRESSION, DOUBLE_EXPRESSION;
TRANSFORMATION # [OPTIONAL]
}
# 3D shapes
# ---------
circle {
center DOUBLE_ARRAY; # 2D array. Lexicographical order.
radius DOUBLE_EXPRESSION.
}
rectangle {
corner_1_coordinates DOUBLE_ARRAY; # 2D array. Lexicographical order.
corner_2_coordinates DOUBLE_ARRAY; # 2D array. Lexicographical order.
TRANSFORMATION # [OPTIONAL]
}
# Transformations
# ===============
TRANSFORMATION ::= invert
| translate DOUBLE_ARRAY
| scale DOUBLE_EXPRESSION
| rotate DOUBLE_EXPRESSION # 2D only
| rotate DOUBLE_ARRAY, DOUBLE_EXPRESSION # 3D only
# Examples:
# Invert the shape (inside becomes outside)
invert;
# Translate the shape
translate (-0.1, 0.0);
# Scale the shape
scale (1.2, 5.4);
# Rotate the shape
rotate 1.8; # 2D, 1.8 radians
rotate (1.0, 0.0, 0.0), 1.5; # 3D: axis, angle
# Examples
# ========
# Pacman
{
difference {
# Pac-Man's body
circle {radius 0.25; center (0,0);}
rectangle { # Mouth
corner_1_coordinates (-0.1,-0.1);
corner_2_coordinates (0.1,0.1);
rotate tau/8.0;
scale (1.5, 1.0);
translate (sqrt(0.05), 0);
}
# Pac-Man's eye
circle {radius 0.025; center (0.05, 0.125);}
}
}
# Fantom
{
difference {
union {
rectangle {corner_1_coordinates (0.0,0.05); corner_2_coordinates (0.5,0.25);}
intersection {
circle {radius 0.25; center (0.25, 0.25);}
rectangle {corner_1_coordinates (-0.1,0.2); corner_2_coordinates (0.6,0.8);}
}
circle {radius 0.05; center (0.05, 0.05);}
circle {radius 0.05; center (0.25, 0.05);}
circle {radius 0.05; center (0.45, 0.05);}
}
circle {radius 0.05; center (0.15, 0.05);}
circle {radius 0.05; center (0.35, 0.05);}
}
}
# Height function in 2D (any function that can be written as h=f(x), here we present the sin(x) function)
# For a rectangular domain between xmin, xmax, ymin, ymax.
# The function may be between point(xmin,Y), point(xmax,Y)
{
double A0 = 1.0; # Amplitude of the sinusoidal
double H = 2.0 ; # The mean height of the sinusoidal
double N = 100 ; # The number of (total) discrete points for the interval [xmin,xmax].
double L = xmax - xmin # Interval length
double E = L; # For precision matters, we need to extend the shape outside the interval, over a length of E.
double dx = L / N;
integer i = 0; # iterator in [1,N]
polygon {
point(xmin-E,ymin-E); point(xmin-E,H);
while(i<=N)
{
double local_x = xmin + i*dx;
point( local_x, H + A0*sin(2*pi*local_x) );
i= i+1;
}
point(xmax+E,H); point(xmax+E,ymin-E);
}
}
}

Advanced solvers

# This file is part of Notus 0.5.0. Copyright Bordeaux-INP, Université de Bordeaux, CNRS
# This software is governed by the CeCILL license under French law ("http://www.cecill.info").
# Solvers for advanced users
#---------------------------
# available solver list:
# - hypre_struct_jacobi
# - hypre_struct_pfmg
# - hypre_struct_smg
# - hypre_struct_pcg
# - hypre_struct_gmres
# - hypre_struct_bicgstab
# - hypre_sstruct_syspfmg
# - hypre_sstruct_gmres
# - hypre_sstruct_bicgstab
# - hypre_parcsr_boomeramg
# - hypre_parcsr_gmres
# - hypre_parcsr_bicgstab
# - mumps_pord
# - notus
solver hypre_struct_jacobi {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
}
solver hypre_struct_pfmg {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
max_level 8;
relative_change;
relaxation_type 1;
coarse_grid_operator_type 0;
pre_relaxation 1;
post_relaxation 1;
skip_relaxation;
}
solver hypre_struct_smg {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
relative_change;
pre_relaxation 1;
post_relaxation 1;
}
solver hypre_struct_pcg {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
two_norm;
absolute_tolerance;
relative_change;
}
solver hypre_struct_gmres {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
max_krylov_dimension 60;
}
solver hypre_struct_bicgstab {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
}
solver hypre_sstruct_syspfmg {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
max_level 8;
relative_change;
relaxation_type 1;
coarse_grid_operator_type 0;
pre_relaxation 1;
post_relaxation 1;
skip_relaxation;
}
solver hypre_sstruct_gmres {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
max_krylov_dimension 60;
}
solver hypre_sstruct_bicgstab {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
}
solver hypre_parcsr_boomeramg {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
strong_threshold 0.25;
coarsen_type 6;
aggressive_coarsening_level 0;
interpolation_type 0;
post_interpolation_type 0;
relaxation_type 1;
}
solver hypre_parcsr_gmres {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
max_krylov_dimension 60;
# Available preconditioners:
# - boomeramg
# - euclid
# - parasails
# - pfmg
# - pilut
# - smg
# - syspfmg
preconditioner boomeramg {
max_iteration 1;
tolerance 1.0d-14;
strong_threshold 0.25;
coarsen_type 6;
aggressive_coarsening_level 0;
interpolation_type 0;
post_interpolation_type 0;
relaxation_type 1;
}
preconditioner euclid {
max_iteration 1;
tolerance 1.0d-14;
}
preconditioner parasails {
max_iteration 1;
tolerance 1.0d-14;
threshold 0.1;
levels 1;
filter 1.0d-3;
slip 0;
}
preconditioner pfmg {
max_iteration 1;
tolerance 1.0d-14;
max_level 8;
relative_change;
relaxation_type 1;
coarse_grid_operator_type 0;
pre_relaxation 1;
post_relaxation 1;
skip_relaxation;
}
preconditioner pilut {
max_iteration 1;
tolerance 1.0d-14;
drop_tolerance 1.0e-5;
factor_row_size 10;
}
preconditioner smg {
max_iteration 1;
tolerance 1.0d-14;
relative_change;
pre_relaxation 1;
post_relaxation 1;
}
preconditioner syspfmg {
max_iteration 1;
tolerance 1.0d-14;
max_level 8;
relative_change;
relaxation_type 1;
coarse_grid_operator_type 0;
pre_relaxation 1;
post_relaxation 1;
skip_relaxation;
}
}
solver hypre_parcsr_bicgstab {
max_iteration 1;
tolerance 1.0d-14;
initial_preconditioner left_jacobi;
absolute_tolerance;
}
!!Recommended settings for BoomerAMG Preconditioner
!Numerous options are provided as it was seen that they all resulted in similar run times
!for select verification and validation cases.
!It should be noted that 3D has greater restrictions on the choice of coarsening and interpolation schemes.
!!2D
!!Option 1
preconditioner boomeramg {
max_iteration 1;
tolerance 0.0;
strong_threshold 0.25;
coarsen_type 6;
interpolation_type 0;
relaxation_type 6; # 3, 4, or 6
elements_per_row_interpolation 4; #4 or 5
aggressive_coarsening_level 1;
aggressive_coarsening_path 1;
interpolation_type_aggressive 1;
}
!! Option 2
preconditioner boomeramg {
max_iteration 1;
tolerance 0.0;
strong_threshold 0.25;
coarsen_type 8; #8 or 10
interpolation_type 6; #6, 7, 8, 9, or 14
relaxation_type 6; # 3, 4, or 6
elements_per_row_interpolation 4; #4 or 5
aggressive_coarsening_level 1;
aggressive_coarsening_path 1;
interpolation_type_aggressive 1;
}
!!3D
preconditioner boomeramg {
max_iteration 1;
tolerance 0.0;
strong_threshold 0.50; #0.50 or 0.60
coarsen_type 8; #8 or 10
interpolation_type 6; #6, 7, or 13
relaxation_type 6; # 3, 4, or 6
elements_per_row_interpolation 4; #4 or 5
aggressive_coarsening_level 1;
aggressive_coarsening_path 1;
interpolation_type_aggressive 1;
}