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.6.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)
# Note: the power operator '^' is left-associative: a^b^c is interpreted as (a^b)^c.
# Example:
a = b/c + c + sqrt(a) + cos(b) + 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);
# Convert double to string: d2s
# First argument: expression resulting in a double value.
# Second argument: expression resulting in a string value representing the
# Fortran format (without parentheses) to print floating point numbers
# (e.g.: "es25.16", "f9.6", etc.)
s = d2s(DOUBLE_EXPRESSION, STRING_EXPRESSION);
# 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:
# The 'global' keyword is used to defined global variables.
# The 'no_redefine' keyword is used to not define the variable if
# it is already defined. Useful with the '-D' command-line argument.
# Both 'global' and 'no_redefine' keywords are optional and mutually exclusive.
integer [global | no_redefine] VARIABLE_NAME = INTEGER_EXPRESSION | DOUBLE_EXPRESSION;
double [global | no_redefine] VARIABLE_NAME = DOUBLE_EXPRESSION | INTEGER_EXPRESSION;
boolean [global | no_redefine] VARIABLE_NAME = BOOLEAN_EXPRESSION;
string [global | no_redefine] 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 'output' is present, the path is relative to the *output* directory (can be changed in the 'system' block)
# When neither keyword is present, the path is relative to the *case* directory
# If STRING_EXPRESSION starts with '/', the path is treated as absolute.
PATH ::= [std | output] 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";
# Test whether a variable exists.
# Returns a boolean value.
is_defined([global] STRING_EXPRESSION)
# Return the value of the variable named as a STRING_EXPRESSION.
# Crashes if the variable does not exist.
value_of([global] STRING_EXPRESSION)
# Return the type of the variable named as a STRING_EXPRESSION.
# Crashes if the variable does not exist.
type_of([global] STRING_EXPRESSION)
# Assign a value to a variable named as a STRING_EXPRESSION.
# TYPE ::= integer | double | boolean | string
# The result of EXPRESSION must be of type TYPE.
# The variable name must be a valid identifier name.
# Undefined variables are defined in the current scope if 'global' is not present.
# If the variable is already defined, it must be of type TYPE.
assign(TYPE [global|no_redefine], STRING_EXPRESSION, EXPRESSION);
# Global variables can be accessed through the 'global' keyword.
global(IDENTIFIER)
# Evaluate a string as it is a normal input.
# It can be put anywhere in the file.
# WARNING: you need a deep understanding of what it does to use it.
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;
# Define a global variable 'i'.
integer global i = 2;
# Increment the global variable 'i'.
global(i) = global(i) + 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 repetition
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]];
# Open a file
# The first argument is an integer identifier which serves as a file handle.
# The second argument is the path of the file.
open(INTEGER_IDENTIFIER, PATH);
# Close a file.
# The argument must be a valid file handle (see 'open').
close(INTEGER_EXPRESSION);
# Write into a opened file.
# The argument must be a valid file handle (see 'open').
# The file must be open (see 'open').
write(INTEGER_EXPRESSION) EXPRESSION, [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
}
# Define a function. Its name is defined by the STRING_EXPRESSION.
# RETURN_TYPE ::= integer | double | boolean | string
# TYPE ::= integer | double | boolean | string
# If RETURN_TYPE is not defined, the function cannot be called inside an expression.
# If the 'by_ref' keyword is used, the argument is passed as a reference, otherwise, the argument is passed by copy.
function [RETURN_TYPE] STRING_EXPRESSION ( [TYPE [by_ref] IDENTIFIER [, ...]] ) {
# … Core of the function …
# If RETURN_TYPE is present:
# - a 'return' statement must be present;
# - the expression following the 'return' keyword must be of type RETURN_TYPE;
# If RETURN_TYPE is not specified:
# - The return statement is optional;
# - No expression should follow the 'return' keyword.
return [EXPRESSION];
}
# Call a function that has no return type.
# The 'global' keyword is required to pass a global variable by reference.
call(STRING_EXPRESSION [, EXPRESSION | [global] IDENTIFIER, [, ...]])
# Evaluate a function inside an expression.
# The 'global' keyword is required to pass a global variable by reference.
eval_function(STRING_EXPRESSION [, EXPRESSION | [global] IDENTIFIER, [, ...]])
# 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).
# The 'global' keyword is required to pass a global variable by reference.
shape_is_inside(
STRING_EXPRESSION,
DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION,
[global] 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.
# The 'global' keyword is required to pass a global variable by reference.
shape_get_distance(
STRING_EXPRESSION,
DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION,
[global] VARIABLE_NAME
[, [global] VARIABLE_NAME, [global] VARIABLE_NAME, [global] 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).
# The 'global' keyword is required to pass a global variable by reference.
shape_ray_trace(
STRING_EXPRESSION,
DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION,
DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION,
[global] 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.
# The 'global' keyword is required to pass a global variable by reference.
ray_get_distance(INTEGΕR_EXPRESSION, [global] VARIABLE_NAME)
# Get the intersection point.
# Arguments:
# 1. Intersection number. Starts from 1.
# 2-4. [OUTPUT ARGUMENT] Coordinates of the intersection point.
# The 'global' keyword is required to pass a global variable by reference.
ray_get_intersection(
INTEGΕR_EXPRESSION,
[global] VARIABLE_NAME, [global] VARIABLE_NAME, [global] 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.
# The 'global' keyword is required to pass a global variable by reference.
ray_get_normal(
INTEGΕR_EXPRESSION,
[global] VARIABLE_NAME, [global] VARIABLE_NAME, [global] VARIABLE_NAME
)
To get exported variables in Fortran code, see user_variables.
Notus file structure
Main structure
# This file is part of Notus 0.6.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.6.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 file numbering (default: false)
# false: "checkpoint_filename_current.bp" and "checkpoint_filename_previous.bp" files
# true: "checkpoint_filename_0.bp", "..._1.bp", ..., files
checkpoint_file_numbering 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;
# [OPTIONAL] Select the face exchange strategy
# - sequential (default): exchange _u, _v, _w components one after the other.
# - asynchronous: exchange components one after the other asynchronously.
# - serialized: serialize all components and exchange.
face_exchange_type sequential | asynchronous | serialized;
}
# 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;
}
system {
enable_checkpoint true;
checkpoint_frequency 50;
checkpoint_metric time_iteration;
checkpoint_file_numbering true;
}
Domain block
# This file is part of Notus 0.6.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.6.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;
# Targeted number of cells per processor when the repartitioning process is applied
number_of_cells_per_proc INTEGER_EXPRESSION;
# List of subdomains to consider in the repartitioning process
subdomain_repartitioning STRING_EXPRESSION [, STRING_EXPRESSION ...];
# The repartitioning must first be run to see all the possibilities (true). Then, it is run with the wanted partitioning (false).
initial_step_repartitioning LOGICAL_EXPRESSION;
# Label of the wanted partitioning
label_wanted_partitioning INTEGER_EXPRESSION;
}
Modeling block
# This file is part of Notus 0.6.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 DOUBLE_EXPRESSION;
molar_mass DOUBLE_EXPRESSION;
specific_heat_cp DOUBLE_EXPRESSION;
specific_heat_cv DOUBLE_EXPRESSION;
thermal_expansion DOUBLE_EXPRESSION;
isothermal_compressibility DOUBLE_EXPRESSION;
speed_of_sound DOUBLE_EXPRESSION;
viscosity DOUBLE_EXPRESSION;
conductivity DOUBLE_EXPRESSION;
reference_temperature DOUBLE_EXPRESSION;
reference_pressure DOUBLE_EXPRESSION;
equation_of_state constant | perfect_gas | peng_robinson | linear_acoustic | linear_temperature | linear_temperature_concentration | linear_concentration ;
# perfect_gas and peng_robinson are relative to compressible flows only
# perfect_gas equation_of_state :
equation_of_state perfect_gas;
# peng_robinson equation_of_state :
equation_of_state peng_robinson {
acentric_factor DOUBLE_EXPRESSION;
critical_pressure DOUBLE_EXPRESSION;
critical_density DOUBLE_EXPRESSION;
critical_temperature DOUBLE_EXPRESSION;
specific_heat_cp_law constant | polynomial_temperature | sutherland;
}
# linear_temperature | linear_temperature_concentration | linear_concentration are relative to Boussinesq approximation only (incompressible approximation)
density_law constant | polynomial_temperature | sutherland | neural_network;
specific_heat_cp_law constant | polynomial_temperature | sutherland | neural_network;
specific_heat_cv_law constant | polynomial_temperature | sutherland | neural_network;
viscosity_law constant | polynomial_temperature | sutherland | neural_network;
conductivity_law constant | polynomial_temperature | sutherland | neural_network;
# material propertie law constant :
viscosity_law constant;
# Sutherland function, array of size 3 = (sutherland_a, sutherland_t, sutherland_s)
# material propertie law sutherland
# need an array of size 3 = (sutherland_a, sutherland_t, sutherland_s)
viscosity_law sutherland (DOUBLE_EXPRESSION, DOUBLE_EXPRESSION, DOUBLE_EXPRESSION);
# material propertie law polynomial_temperature
# need an array of size p+1 where p is the order of the polynom
viscosity_law polynomial_temperature (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]*);
# material propertie law neural_network need the following block
# This block can be generated from python scripts in tools/neural/network
# Please read tools/neural_network/README.md
viscosity_law neural_network {
pressure_extremum (DOUBLE_EXPRESSION,DOUBLE_EXPRESSION);
temperature_extremum (DOUBLE_EXPRESSION,DOUBLE_EXPRESSION);
field_extremum (DOUBLE_EXPRESSION,DOUBLE_EXPRESSION);
neuron_number INTEGER_EXPRESSION;
hidden_layer_number INTEGER_EXPRESSION;
input_weights (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
input_weights (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
input_bias (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
hidden_weights (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
hidden_bias (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
output_weights (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
output_bias (DOUBLE_EXPRESSION [, DOUBLE_PRECISION]* );
}
}
# Definition of SOLID_PROPERTIES
solid STRING_EXPRESSION {
density DOUBLE_EXPRESSION;
conductivity DOUBLE_EXPRESSION;
specific_heat_cp DOUBLE_EXPRESSION;
specific_heat_cv DOUBLE_EXPRESSION;
thermal_expansion 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 DOUBLE_EXPRESSION; # Constant value
density linear_temperature DOUBLE_EXPRESSION; # Boussinesq
conductivity DOUBLE_EXPRESSION;
specific_heat_cp DOUBLE_EXPRESSION;
specific_heat_cv DOUBLE_EXPRESSION;
thermal_expansion 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 compressible formulation (default: false)
compressible BOOLEAN_EXPRESSION;
# [OPTIONAL] Enable Boussinesq approximation (single phase flow only) (default: false)
boussinesq_approximation BOOLEAN_EXPRESSION;
# [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 vector is given)
gravity_term DOUBLE_ARRAY;
# [OPTIONAL] Driving pressure (default: false)
enable_driving_pressure BOOLEAN_EXPRESSION;
# [OPTIONAL] Pressure source term
pressure_source_term {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Source term
momentum_source_term {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Linear term
momentum_linear_term {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Continuity source term
continuity_source_term {
SCALAR_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;
}
# only valid for compressible with predict_density=.true.
density_boundary_condition {
# See boundary_conditions.nts
}
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 relative pressure to the reference pressure defined in material
# relative pressure = p(x,y,z,t) - p0
relative_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] Enable viscous dissipation term (default: false)
enable_viscous_dissipation_rate_term BOOLEAN_EXPRESSION;
# [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;
}
# [OPTIONAL] Energy equation formulation cp | cv.
# Default: Cp for incompressible flows; Cv for compressible flows
formulation cp;
formulation cv;
}
phase_advection {
# [OPTIONAL] Enable advection term (default: true)
enable_advection_term BOOLEAN_EXPRESSION;
# [OPTIONAL] Set boundary conditions.
# By default, all the boundary conditions are set to `free`.
boundary_condition {
# Definitions:
# BOUNDARY_LOCATION ::= ∅ | left | right | bottom | top | back | front
# MATERIAL ::= fluid STRING_EXPRESSION
# | solid STRING_EXPRESSION
# | porus_medium STRING_EXPRESSION fluid STRING_EXPRESSION
#
# Note that in the following definitions, the {SHAPE_INITIALIZER} block is optional.
# Impose `inlet` boundary condition.
BOUNDARY_LOCATION inlet MATERIAL [ {SHAPE_INITIALIZER} ]
# Impose `free` boundary condition.
BOUNDARY_LOCATION free [ {SHAPE_INITIALIZER} ]
# Alternative definition using a block containing boundary types.
BOUNDARY_LOCATION {
# Impose `inlet` boundary condition.
inlet MATERIAL [ {SHAPE_INITIALIZER} ]
# Impose `free` boundary condition.
free [ {SHAPE_INITIALIZER} ]
}
}
# [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
}
# [OPTIONAL] Impose a velocity field.
# Cannot be used if 'navier_stokes' is defined in 'modeling/equations'.
velocity_field {
VECTOR_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 {
}
# LES WALE model
les wale {
}
# Energy: turbulent Prandtl number
energy constant_turbulent_prandtl DOUBLE_EXPRESSION; #default 0.5
# Species transport: turbulent Schmidt number
species_transport constant_turbulent_schmidt DOUBLE_EXPRESSION; #default: 0.7
}
# [OPTIONAL] Define a user scalar equation.
user_scalar STRING_EXPRESSION {
# [OPTIONAL] Define a scalar field named STRING_EXPRESSION.
scalar_field STRING_EXPRESSION {
SCALAR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Define a boundary condition named STRING_EXPRESSION.
boundary_condition STRING_EXPRESSION {
# Same as 'Energy equation' in 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
}
}
# [OPTIONAL] Define a user vector equation.
user_vector STRING_EXPRESSION {
# [OPTIONAL] Define a vector field named STRING_EXPRESSION.
vector_field STRING_EXPRESSION {
VECTOR_INITIALIZER # See initializer.nts
}
# [OPTIONAL] Define a boundary condition named STRING_EXPRESSION.
boundary_condition STRING_EXPRESSION {
# Same as 'Navier-Stokes equation' in 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
}
}
}
}
Numerical parameters block
# This file is part of Notus 0.6.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 {
# Common stability factor for all terms (all equations), including the Courant number.
temporal_stability_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;
# Enable/disable the computation of the advection stability time step
enable temporal_stability_factor advection BOOLEAN_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.
# l2 norm is used
stop_tests {
# [OPTIONAL] Compute relative errors
relative_stationarity BOOLEAN_EXPRESSION;
# [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_nusselt DOUBLE_EXPRESSION;
stationarity_temperature DOUBLE_EXPRESSION;
stationarity_pressure DOUBLE_EXPRESSION;
stationarity_velocity DOUBLE_EXPRESSION;
stationarity_species DOUBLE_EXPRESSION;
stationarity_nusselt_time_averaged DOUBLE_EXPRESSION;
stationarity_temperature_time_averaged DOUBLE_EXPRESSION;
stationarity_pressure_time_averaged DOUBLE_EXPRESSION;
stationarity_velocity_time_averaged DOUBLE_EXPRESSION;
stationarity_species_time_averaged DOUBLE_EXPRESSION;
}
# [OPTIONAL] Numerical parameters relative to materials
materials {
# [OPTIONAL] Select the method to initialize the materials (default: sampling).
method sampling | moment_fitting;
# [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;
# Stability factor for momentum diffusion term
temporal_stability_factor diffusion DOUBLE_EXPRESSION;
# Stability factor for acoustic waves propagation (requires "compressible")
temporal_stability_factor acoustic DOUBLE_EXPRESSION;
# Stability factor for surface tension waves propagation (requires surface tension). It is always activated and set to 1 by default.
temporal_stability_factor surface_tension DOUBLE_EXPRESSION;
# Enable/disable the computation of some equations stability time step
enable temporal_stability_factor diffusion|acoustic|surface_tension BOOLEAN_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:incremental_pressure_correction)
# Automatically selected.
# non-incremental_pressure_correction (not generalized, only for tests)
# incremental_pressure_correction for multiphase flows or monophase compressible flows
# rotational_incremental_pressure_correction for monophase incompressible flows
# divergence_incremental_pressure_correction for monophase compressible flows
velocity_pressure_method incremental_pressure_correction;
# compressible: predict density step (default: true)
compressible_has_predict_density BOOLEAN_EXPRESSION;
# [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
# (default: false)
pressure_increment_poisson_dodd_approximation BOOLEAN_EXPRESSION;
# 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
# (default: false)
pressure_increment_poisson_frantzis_approximation BOOLEAN_EXPRESSION;
# Approximation may not start at first time iteration (default: 5).
poisson_approximation_iteration_start INTEGER_EXPRESION;
# 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)
# (default: penalization)
pressure_increment_invertible_matrix_method penalization | null_rhs | none
# [OPTIONAL] Choice of the point where the pressure increment is set to zero (cell penalization method).
# 2D (default: bottom_left_corner)
pressure_increment_penalized_cell bottom_left_corner
| bottom_right_corner
| top_right_corner
| top_left_corner;
# 3D (default: back_bottom_left_corner)
pressure_increment_penalized_cell back_bottom_left_corner
| 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 (default: o2_centered).
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] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting BOOLEAN_EXPRESSION;
# [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)
advection_scheme explicit lw_tvd_sb {
# Lie-Trotter or Straing operator splitting
splitting_method lie_trotter | strang;
# [OPTIONAL] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
}
# Compressible: pressure advection scheme
pressure_advection_scheme lw_tvd_sb | weno3 | uncentered_o2 (default);
# [OPTIONAL] (default: 'implicit o2_centered')
diffusion_scheme implicit o2_centered
| o2_centered_stretched
| user_defined_stencil_1_star
| user_defined_stencil_2_star
| user_defined_stencil_1_square
| user_defined_stencil_2_square;
# Warning: '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: implicit)
surface_tension implicit | explicit;
# [OPTIONAL] (default: false) use a sharp VF for surface tension (LSM)
surface_tension_sharp BOOLEAN_EXPRESSION;
# [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
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
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;
# CFL factor for energy diffusion term
temporal_stability_factor diffusion DOUBLE_EXPRESSION;
# Enable/disable the computation of some equations stability time step
enable temporal_stability_factor diffusion BOOLEAN_EXPRESSION;
# [OPTIONAL] Advection scheme (default: o2_centered).
advection_scheme implicit o2_centered
| o1_upwind
| o2_upwind
| quick
| houc3
| 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] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
# [OPTIONAL] (default: true)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting BOOLEAN_EXPRESSION;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
flux_limiter low_order | high_order | superbee | minmod | van_leer;
}
# [OPTIONAL] TVD Lax-Wendroff with Superbee limiter with either operator splitting (default: lie_trotter)
advection_scheme explicit lw_tvd_sb {
# Lie-Trotter or Strang operator splitting
splitting_method lie_trotter | strang;
# [OPTIONAL] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
}
# [OPTIONAL] (default: 'implicit o2_centered')
diffusion_scheme implicit o2_centered
| o2_centered_stretched
| user_defined_stencil_1_star
| user_defined_stencil_2_star
| user_defined_stencil_1_square
| user_defined_stencil_2_square ;
# Warning: 'o4_centered' does not currently support rectilinear grids.
diffusion_scheme explicit o2_centered | o4_centered;
# [OPTIONAL] Include ghost boundary cells in the linear system (default: false).
has_ghost_boundary_cells BOOLEAN_EXPRESSION;
solver LINEAR_SOLVER # See basic_solvers.nts
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
# Phase change numerical parameters [OPTIONAL]
phase_change {
# Select one method
method iterative; # Iterative algorithm (Voller)
| mof; # Use MOF reconstruction
| apparent_heat_capacity; # Use Apparent heat capacity 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 LINEAR_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;
# CFL factor for species transport diffusion term
temporal_stability_factor diffusion DOUBLE_EXPRESSION;
# Enable/disable the computation of some equations stability time step
enable temporal_stability_factor diffusion BOOLEAN_EXPRESSION;
# [OPTIONAL] Advection scheme (default: o2_centered).
advection_scheme implicit o2_centered
| o1_upwind
| o2_upwind
| quick
| houc3
| 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] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
# [OPTIONAL] (default: false)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting BOOLEAN_EXPRESSION;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
# TVD Lax-Wendroff with Superbee limiter with either operator splitting (default:lie_trotter)
advection_scheme explicit lw_tvd_sb {
# Lie-Trotter or Strang operator splitting
splitting_method lie_trotter | strang;
# [OPTIONAL] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
}
# [OPTIONAL] (default: 'implicit o2_centered')
diffusion_scheme implicit o2_centered
| o2_centered_stretched
| 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
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
}
phase_advection {
# [OPTIONAL] Overwrite global time step for the advection equation
time_step DOUBLE_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] 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.
# The choice of the method (default: inverse_distance) is followed by the smoothing length (number of cells)
smooth_volume_fraction spline_kernel | inverse_distance INTEGER_EXPRESSION;
# [OPTIONAL] (default: semi_implicit)
temporal_scheme semi_implicit | crank_nicolson;
# [OPTIONAL] Multistep method (default: 1)
# Substep iterations that improves volume conservation
number_of_substeps INTEGER_EXPRESSION;
# [OPTIONAL] Conservative Weymouth method (default: false)
use_conservative_method BOOLEAN_EXPRESSION;
}
# Use the moment-of-fluid method to advect phases
mof {
# [OPTIONAL] Tolerance value for the angle bracketting
tolerance_angle DOUBLE_EXPRESSION;
# [OPTIONAL] Tolerance value for the derivative
tolerance_derivative DOUBLE_EXPRESSION;
# [OPTIONAL] CFL
temporal_stability_factor DOUBLE_EXPRESSION;
# [OPTIONAL] Use analytic reconstruction (faster, default: true)
# [OPTIONAL] 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] Use binary-tree reconstruction (useful option when using at least 4 materials)
use_b_tree 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] 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.
# The choice of the method (default=inverse_distance) is followed by the smoothing length (number of cells)
smooth_volume_fraction spline_kernel|inverse_distance INTEGER_EXPRESSION;
# Use the Navier boundary condition (default: true)
use_navier_boundary_condition BOOLEAN_EXPRESSION # [OPTIONAL]
}
# Use the level set method to advect phases
levelset {
# [OPTIONAL] Curvature method (default: normal_divergence)
curvature_method normal_divergence;
| closest_points;
# [OPTIONAL] (default: tanh_spread)
volume_fraction tanh_spread|sinus|towers|gibou|regular|tanh_uncut;
# [OPTIONAL] (default: 1.5)
half_interface_thickness DOUBLE_EXPRESSION;
compute_closest_points; # [OPTIONAL]
closest_points {
method standard | geometric; # [OPTIONAL] (default: standard)
precision DOUBLE_EXPRESSION; # [OPTIONAL] descent precision factor (default: 1d-6)
debug; # [OPTIONAL] activate debug output
order INTEGER_EXPRESION; # [OPTIONAL] interpolation order: 2,4,6 (default: 4)
}
# 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)
# Reinitialize the level set at initialization (default: true)
reinitialization at_start BOOLEAN_EXPRESSION;
reinitialization none; # Do not reinitalize (regularly) the LS.
reinitialization # (default) Reinitialize the LS (with optional parameters)
{
# Reinitialization method (default: closest_points)
method closest_points | hamilton_jacobi | hcr2;
# Reinitialize every N iterations (default: 1). Should be 1 for RCP.
every INTEGER_EXPRESSION;
# HJ specific parameters:
# The minimum number of iterations (default: 10)
min_iteration INTEGER_EXPRESSION;
# The maximum number of iterations (default: 30)
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 the curvature filter (default: false)
use_filter BOOLEAN_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 number of smoothing iterations (default: 5).
smoothing INTEGER_EXPRESION;
# Apply a supplementary smoothing with the heat equation (default: false)
heat BOOLEAN_EXPRESSION;
}
# Use a mass conservation algorithm (default: false)
mass_conservation BOOLEAN_EXPRESSION;
}
# 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;
}
# [OPTIONAL] Advection scheme (default: o2_centered).
advection_scheme implicit o2_centered
| o1_upwind
| o2_upwind
| quick
| houc3
| 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] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
# [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 {
# Lie-Trotter or Strang operator splitting
splitting_method lie_trotter | strang;
# [OPTIONAL] The CFL factor used for (eventual) sub iterations (see the Fortran code for detailed default values)
temporal_stability_factor DOUBLE_EXPRESSION;
}
has_ghost_boundary_cells BOOLEAN_EXPRESSION; # Include ghost boundary cells in the linear system
solver LINEAR_SOLVER # See basic_solvers.nts
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
}
les mixed_scale {
}
les wale {
}
}
# [OPTIONAL] The STRING_EXPRESSION must match the name of the user
# scalar equation defined in the 'modeling/equations' block.
user_scalar STRING_EXPRESSION {
# [OPTIONAL]
time_step DOUBLE_EXPRESSION;
# [OPTIONAL]
time_order_discretization DOUBLE_EXPRESSION;
# [OPTIONAL] The STRING_EXPRESSION must match the name of the boundary condition.
boundary_condition_scheme STRING_EXPRESSION linear | quadratic;
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
# [OPTIONAL] Advection scheme (default: o2_centered).
advection_scheme implicit o2_centered
| o1_upwind
| o2_upwind
| quick
| houc3
| 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: false)
# Use a directional splitting algorithm (x, then y, then z)
directional_splitting BOOLEAN_EXPRESSION;
# [OPTIONAL] (default: godunov)
flux_type godunov | lax_wendroff | force | flic;
# [OPTIONAL]
# 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
| o2_centered_stretched
| 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;
# [OPTIONAL]
solver LINEAR_SOLVER # See basic_solvers.nts
}
# [OPTIONAL] The STRING_EXPRESSION must match the name of the user
# vector equation defined in the 'modeling/equations' block.
user_vector STRING_EXPRESSION {
# [OPTIONAL]
time_step DOUBLE_EXPRESSION;
# [OPTIONAL]
time_order_discretization DOUBLE_EXPRESSION;
# [OPTIONAL] The STRING_EXPRESSION must match the name of the boundary condition.
boundary_condition_scheme STRING_EXPRESSION linear | quadratic;
# [OPTIONAL] Enforce the stencil size. A larger stencil will be used if it is required.
enforced_stencil star_1 | star_2 | square_1 | square_2;
# Advection scheme (default: o2_centered).
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 BOOLEAN_EXPRESSION;
# [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
| o2_centered_stretched
| user_defined_stencil_1_star
| user_defined_stencil_2_star
| user_defined_stencil_1_square
| user_defined_stencil_2_square;
# Warning: 'o4_centered' does not currently support rectilinear grids
diffusion_scheme explicit o2_centered | o4_centered;
# [OPTIONAL]
solver LINEAR_SOLVER # See basic_solvers.nts
}
}
Post-processing block
# This file is part of Notus 0.6.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
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
#
# FIELD ::= velocity | pressure | temperature
# FIELD ::= species_concentration STRING_EXPRESSION | volume_fraction STRING_EXPRESSION
validation {
# [OPTIONAL] Compute the min value of the FIELD.
min FIELD;
# [OPTIONAL] Compute the max value of the FIELD.
max FIELD;
# [OPTIONAL] Compute the mean value of the FIELD.
mean FIELD;
# [OPTIONAL] Compute the difference between the FIELD to the reference FIELD (L∞ norm).
reference_solution_error FIELD;
# [OPTIONAL] Compute the area of symmetric difference.
reference_solution_area_of_symmetric_difference;
}
# [OPTIONAL] statistics (compute time averaged fields, field fluctuations, field rms)
statistics {
start_time DOUBLE_EXPRESSION;
compute_time_averaged_fields velocity, pressure, temperature, density, species_concentration, density, viscosity, specific_heat_cp, conductivity, nusselt_number, ratio_fluctuation_mean_mass_flux, ratio_fluctuation_mean_rhoT;
compute_fluctuation_fields velocity, pressure, temperature, density, species_concentration;
compute_rms_fields velocity, pressure, temperature, density, species_concentration;
compute_favre_decomposition velocity, 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_cp | 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 ::= momentum_linear_term | momentum_source_term
# OUTPUT_FIELD ::= density_gravity_term_boussinesq
#
# Multiphase variables
# --------------------
# OUTPUT_FIELD ::= volume_fraction
# MOF related variables:
# OUTPUT_FIELD ::= centroids | mof_phases
# Levelset related variables:
# OUTPUT_FIELD ::= interface_curvature | interface_normal
# OUTPUT_FIELD ::= levelset {field|band|kinks|closest_points}
#
# Species variables
# -----------------
# OUTPUT_FIELD ::= species_concentration | species_diffusion_coefficient
#
# Energy variables
# ----------------
# OUTPUT_FIELD ::= energy_source_term | temperature | viscous_dissipation_rate
#
# User variables
# ----------------
# OUTPUT_FIELD ::= scalar_field STRING_EXPRESSION | vector_field STRING_EXPRESSION
#
# 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 ::= kolmogorov_timescale | tke_dissipation_rate
# ratio_fluctuation_mean_mass_flux :
# <density_fluctuation * velocity_fluctuation> / (<density> <velocity>)
# with <X> time_averaged value of X
# OUTPUT_FIELD ::= ratio_fluctuation_mean_mass_flux
# ratio_fluctuation_mean_rhoT :
# <density_fluctuation * temperature_fluctuation> / (<density> <temperature>)
# with <X> time_averaged value of X
# OUTPUT_FIELD ::= ratio_fluctuation_mean_rhoT
#
# Statistics
# ----------
# OUTPUT_FIELD ::= pressure_fluctuation | species_concentration_fluctuation | temperature_fluctuation | density_fluctuation | velocity_fluctuation
# OUTPUT_FIELD ::= pressure_rms | species_concentration_rms | temperature_rms | density_rms | velocity_rms
# OUTPUT_FIELD ::= pressure_time_averaged | species_concentration_time_averaged | temperature_time_averaged | density_time_avegared | velocity_time_averaged
# OUTPUT_FIELD ::= tke_disspiation_rate_time_averaged | kolmogorov_timescale_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 DOUBLE_EXPRESSION; #temperature or concentration difference
# 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 ::= mass_loss
# QUANTITY ::= energy_budget
# QUANTITY ::= max FIELD
# QUANTITY ::= mean FIELD
# QUANTITY ::= kolmogorov_timescale
# 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 ::= batchelor_scale
# QUANTITY ::= kolmogorov_scale
# 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 ::= batchelor_scale | kolmogorov_scale
# 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.6.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_solvers.nts 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 {
# [OPTIONAL] Level of printing for error, warning, and diagnostic (default: 0).
# verbosity ≤ 0: no message output (errors are handled by Notus);
# verbosity = 1: Error messages only;
# verbosity = 2: Errors, warning, and main statistics printed;
# verbosity = 3: Errors, warning, and terse diagnostics printed;
# verbosity ≥ 4: Errors, warning, information on input, and output parameters printed.
# All messages are printed to the standard output except error messages that
# are output to the standard error.
verbosity INTEGER_PARAMETER;
# [OPTIONAL] The right-hand side is distributed across the processes (default: true).
use_distributed_rhs BOOLEAN_EXPRESSION;
# [OPTIONAL] The solution is distributed across the processes (default: true).
use_distributed_solution BOOLEAN_EXPRESSION;
# [OPTIONAL] Compute the condition number (very expensive) (default: false).
compute_condition_number BOOLEAN_EXPRESSION;
# [OPTIONAL] Percentage increase in the estimated working space (default: 40).
extra_memory INTEGER_PARAMETER;
# [OPTIONAL] Use an initial preconditioner (default: left_jacobi).
initial_preconditioner left_jacobi | none;
}
# 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.6.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
# ===============
# By default, all the boundary conditions are set to `free`.
boundary_condition {
# Definitions:
# BOUNDARY_LOCATION ::= ∅ | left | right | bottom | top | back | front
# MATERIAL ::= fluid STRING_EXPRESSION
# | solid STRING_EXPRESSION
# | porus_medium STRING_EXPRESSION fluid STRING_EXPRESSION
# Impose `inlet` boundary condition.
BOUNDARY_LOCATION inlet MATERIAL [ { SHAPE_INITIALIZER } ]
# Impose `free` boundary condition.
BOUNDARY_LOCATION free [ {SHAPE_INITIALIZER} ]
# Alternative definition using a block containing boundary types.
BOUNDARY_LOCATION {
# Impose `inlet` boundary condition.
inlet MATERIAL [ {SHAPE_INITIALIZER} ]
# Impose `free` boundary condition.
free [ {SHAPE_INITIALIZER} ]
}
}
Initializer
# This file is part of Notus 0.6.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.6.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.6.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;
}