# arb finite volume solver
# Copyright 2009,2010 Dalton Harvie (daltonh@unimelb.edu.au)
#
# arb is released under the GNU GPL. For full details see the license directory.
#
#-------------------------------------------------------------------
VERSION 0.53 # the version of syntax used in this file
# the following strings describe the simulation and are passed to the output files
INFO_TITLE "Steady state flow around an offset cylinder within a channel"
INFO_DESCRIPTION "Tutorial 3: Here the steady-state Navier-Stokes equations are solved in 2D, using an unstructured mesh. The Reynolds number for the problem based on the cylinder diameter and maximum inlet velocity is 20. This is a CFD benchmark problem. The problem is not physical however, as the inlet has an imposed parabolic profile but is also very close to the cylinder."
INFO_AUTHOR "Dalton Harvie"
INFO_DATE "14/5/14" # interpreted as the last modification date
#-------------------------------------------------------------------
# system constants
#KERNEL_OPTIONS polynomialorder=3 # setting order of kernel function for face derivatives
#KERNEL_OPTIONS checkminw=.true.,minimumminw=0.8d0 # reducing the minw a bit which will decrease the size of the kernels
#-------------------------------------------------------------------
# geometry
# CELL_REGION/FACE_REGION specified by: "location string" # comments
# where location string could be: "at(x1,x2,x3)" for a single point closest to these coordinates
# where location string could be: "withinbox(x1_min,x2_min,x3_min,x1_max,x2_max,x3_max)" for all elements within a box defined by the minimum and maximum coordinate values
# where location string could be: "compound(+-)" for a + and - compound region list
# where location string could be: "boundaryof()" - boundary faces/cells contained within or surrounding
# where location string could be: "domainof()" - domain faces/cells contained within
# where location string could be: "associatedwith( )" - faces/cells both contained within and surrounding
FACE_REGION "compound(--)"
# MSH_FILE instructs arb to read or write a gmsh file (location is read location - write location will always be within the output directory)
# output options are: output,centringoutput,meshoutput,centringmeshoutput,nooutput
# input options are: input,centringinput,meshinput,centringmeshinput,noinput
# data output format options for CELL centred data (which overwrite individual variable options if specified): elementdata,elementnodedata,elementnodelimiteddata
# vtk file output options are: vtkoutput,centringvtkoutput,meshvtkoutput,centringmeshvtkoutput,novtkoutput (novtkoutput is the default)
# dat file output options are: datoutput,centringdatoutput,meshdatoutput,centringmeshdatoutput,nodatoutput (nodatoutput is the default)
MSH_FILE "steady_state_channel_flow_with_cylinder.msh"
MSH_FILE "output/output.msh" centringvtkoutput,datoutput
#-------------------------------------------------------------------
# variable definition reference:
# REGION_LIST ... # comments: line has the ordered names of any regions
# (CELL_|FACE_)REGION_CONSTANT [multiplier*units] numerical_value_for_region_1 .. value_for_region_n options # comments: sets a constant that varies with region
# (CELL_|FACE_|NONE_|)CONSTANT [multiplier*units] numerical_value ON options # comments: sets a constant specific to one region or no regions and has the form
# (CELL_|FACE_|NONE|)CONSTANT [units] "expression (involving only constants)" ON options # comments
# (CELL_|FACE_|NONE|)TRANSIENT [units] "expression (initial value, optional, evaluated in descending relstep order)" "expression (evaluated in ascending relstep order)" ON options # comments
# (CELL_|FACE_|NONE|)NEWTIENT [units] "expression (initial value, optional, evaluated in descending relstep order)" "expression (evaluated in ascending relstep order)" ON options # comments
# (CELL_|FACE_|NONE|)DERIVED [units] "expression" ON options # comments
# (CELL_|FACE_|NONE|)UNKNOWN [units] "expression (initial value, optional)" ON options # comments
# (CELL_|FACE_|NONE|)EQUATION [units] "expression (equation equaling zero)" ON options # comments
# (CELL_|FACE_|NONE|)OUTPUT [units] "expression" ON options # comments
# (CELL_|FACE_|NONE|)CONDITION [units] "expression" ON options # comments
# (CELL_|FACE_|NONE|)LOCAL [units] "expression" ON options # comments
# options include (with p=perl and f=fortran indicating which piece of code needs to know the option):
#p derivative/noderivative - for DERIVED, EQUATION, LOCAL : do or do not calculate Jacobian derivatives for this variable
#p positive/negative/nocheck - for DERIVED, UNKNOWN, EQUATION, LOCAL : check at each iteration that variable is positive/negative
#f output/nooutput - for ALL : output compound to msh files
#f componentoutput/nocomponentoutput - for ALL : output just this component to msh files
#f stepoutput/stepoutputnoupdate/nostepoutput - for ALL : output compound to step file. The noupdate one does not update the variable when the step file is written (needed for recording when output occurred for example).
#f componentstepoutput/componentstepoutputnoupdate/nocomponentstepoutput - for ALL : output just this component to step files
#f input/noinput - for CONSTANT, TRANSIENT, UNKNOWN : read in compound from msh files - only these 3 variable types can be read in
#f componentinput/nocomponentinput - for CONSTANT, TRANSIENT, UNKNOWN : read in just this component from msh files - only these 3 variable types can be read in
#f elementdata,elementnodedata,elementnodelimiteddata - for CELL centred var : data type when writing this compound (unless gmesh overide is specified) (also same for components with prefix component)
#p outputcondition,stopcondition,convergencecondition,bellcondition - for CONDITION, type of condition, can have multiple conditions for the one variable
#f magnitude=value - for EQUATION, UNKNOWN specifies the initial variable magnitude to be used (rather than being based on the initial variable values) - a negative number will cause the magnitude to be set based upon the initial values (which is the default)
#f dynamicmagnitude/staticmagnitude - for EQUATION, UNKNOWN, adjust magnitude of variable dynamically as the simulation progresses, or keep it constant at the initial magnitude
#f dynamicmagnitudemultiplier=value - for EQUATION, UNKNOWN, multiplier to use when adjusting magnitude of variable dynamically (=>1.d0, with 1.d0 equivalent to static magnitudes, and large values placing no restriction on the change in magnitude from one newton iteration to the next)
# clearoptions - remove all previously (to the left and above the clearoptions word) user-specified options for this variable
INCLUDE_TEMPLATE "general/cartesian_x1y2" # comment out any references to the third dimension and set the <> list, used in the template files
# variables etc
# use templates from the navier_stokes directory to build up problem
INCLUDE_TEMPLATE "navier_stokes" # this is the base directory that will be appended to the following files
INCLUDE "constants" # specify physical and numerical constants
INCLUDE "domain" # equations to be solved within the domain
INCLUDE "outlet_p_set" # outlet BC
INCLUDE "walls" # nonslip walls BC
# inlet BCs have to be special cased a bit
#INCLUDE "inlet_u_fully_developed" # fully developed velocity profile, setting a uniform pressure to give using
INCLUDE "inlet_u_set" # velocity profile set as uniform
# overwritting the uniform profile with the parabolic one from the test problem
FACE_EQUATION "+6.d0***(0.41d0-)/(0.41d0^2)" ON
# overwrite previous properties with the following
CONSTANT [Pa.s] 1.d-3 # viscosity of liquid
CONSTANT [kg/m^3] 1.d0 # density
CONSTANT [m/s] 0.2d0 # average inlet velocity
# calculate drag and lift on object
NONE_OUTPUT [N] "facesum(*dot(,),)" # force on object in axial direction
NONE_OUTPUT [N] "facesum(*dot(,),)" # force on object in vertical direction
NONE_OUTPUT "2.d0*/(*^2*0.1d0)" # drag coefficient
NONE_OUTPUT "2.d0*/(*^2*0.1d0)" # lift coefficient
# and turn some outputs on using the generic VARIABLE statement that picks up the last type and centring
VARIABLE output
VARIABLE output
VARIABLE output
VARIABLE output
VARIABLE output
#INCLUDE_TEMPLATE "navier_stokes"
#INCLUDE "strain_rate_magnitude"
#-------------------------------------------------------------------