Boundary and Initial Conditions
Main.Finch.addBoundaryID
Main.Finch.boundary
Main.Finch.evalInitialConditions
Main.Finch.initial
Main.Finch.referencePoint
Main.Finch.addBoundaryID
— MethodaddBoundaryID(bid::Int, trueOnBdry)
Create a new boundary region with the given ID number bid. It will be assigned to all boundary faces where the center of the face satisfies trueOnBdry. It will override any previously set ID for those faces.
trueOnBdry can be a function or a string expression of (x,y,z). Note that it only applies to faces that are known boundary faces, not interior faces.
Main.Finch.boundary
— Functionboundary(var, bid, bc_type, bc_exp=0)
Set a boundary condition for a given variable on a boundary region with this ID(bid). The type can be DIRICHLET, NEUMANN, NOBC, FLUX. bcexp can be a constant number or a string expression. NOBC type does not need a bcexp value.
Possible expressions can include coordinates(x, y, z, t), callback functions, coefficients, variables, indexers, and certain other symbols such as "normal", "nodeindex", "faceindex".
Main.Finch.referencePoint
— MethodreferencePoint(var, pos, val)
Constrain a variable value at a single node to the given value. This is needed for certain situations where boundary conditions do not uniquely constrain a variable. The node closest to the position in pos will be used and it can be a boundary or interior node.
Main.Finch.initial
— Methodinitial(var, ics)
Set the initial condition for this variable. The value can be a constant number or a string expression of coordinates(x, y, z). This does not immediately set the variable values. To do so, use evalInitialConditions(), or it will be done automatically before solving.
Main.Finch.evalInitialConditions
— MethodevalInitialConditions()
Evaluate initial conditions for all variables if possible. This puts the initial values into each variable's values array. This is called automatically by the solve step, but can be done manually here.