In the data set equation the user defines the functional equation to be solved by VECFEM. Using the parameters defined in the resource file it is transformed into a FORTRAN source code for the solution of the problem, see vembuild. The equation may be steady or nonsteady.
In the case of a steady problem, the NK-valued solution u=(u<i>) is selected from a space H of smooth, NK-valued functions. The equation can be given in the formulation of a steady functional equation:
[1] for all v in H with v(i)|D<i>=0 for all i=1,..,NK: F{u}(v)=0 and for all i=1,...,NK : u<i>|D<i>=b<i>or in the formulation of a steady variational equation
[2] F{u}=minimal over all u in H with u<i>|D<i>=b<i> for all i=1,..,NK.In both cases the condition 'u<i>|D<i>=b<i> for all i=1,..,NK' is called the Dirichlet condition, where D<i> is a subset of the domain of u<i>. b<i> is a smooth function on D<i> which must not depend on the solution u. F is a real-valued functional which depends arbitrarily on the searched solution u in H and in the case [1] linearly on the NK-valued test function v=(v<i>) in H.
In the case of a nonsteady problem, the NK-valued solution u=(u<i>) depends on the time t, t0<=t<=tend, and for all t it is selected from a space H of smooth, NK-valued functions. The equation can be given in the formulation of a nonsteady functional equation:
[3] for all v in H with v(i)|D<i>=0 for all i=1,..,NK: F{t,ut,u}(v)=0 for all t0<t<tend, for all i=1,...,NK : u<i>(t)|D<i>=b<i>(t) for all t0<t<tend and for all i=1,...,NK : u<i>(t0)=u0<i>.The condition 'u<i>(t)|D<i>=b<i>(t) for all i=1,..,NK' is called the Dirichlet condition, where D<i> is a subset of the domain of u<i>. For all t0<t<tend, b<i>(t) is a smooth function on D<i> which must not depend on the solution u. The condition 'u<i>(t0)=u0<i> for all i=1,..,\INK' is called the initial condition, where u0 is a given function in H. F is a real-valued functional which depends arbitrarily on the searched solution u in H, its derivative with respect to the time t and the time t itself, and linearly on the NK-valued test function v=(v<i>) in H.
The script for the definition of the functional equation has three sections. In the first section parameters are defined, in the second one the Dirichlet conditions are specified and in the third one the functional F is described. Lines starting with '#' are comment lines. Spaces are insignificant. Upper- and lower-case letters are equivalent.
Allowed expressions are real constants, reserved symbols, the parameters declared in the parameter section and operator evaluations. The following operators are available:
OPERATOR NAME | MEANING | REMARKS |
<expr1> + <expr2> | sum | |
<expr1> - <expr2> | difference | |
<expr1> * <expr2> | product | |
<expr1> / <expr2> | quotient | |
<expr1> ^ <expr2> | power function | |
sqrt(<expr1>) | square root | |
max(<expr1>,<expr2>) | maximal value | |
min(<expr1>,<expr2>) | minimal value | |
abs(<expr1>) | absolute value function | |
exp(<expr1>) | exponential function | |
ln(<expr1>) | natural logarithm | |
sin(<expr1>) | sine | |
sinh(<expr1>) | hyperbolic sine | |
arcsin(<expr1>) | inverse sine | |
cos(<expr1>) | cosine | |
cosh(<expr1>) | hyperbolic cosine | |
arccos(<expr1>) | inverse cosine | |
tan(<expr1>) | tangent | |
tanh(<expr1>) | hyperbolic tangent | |
arctan(<expr1>) | inverse tangent |
SYMBOL | MEANING |
t | time t |
x<j> | j-coordinate of location x |
tau<j><k> | j-coordinate of k-th normalized area tangential direction |
tau<j> | j-coordinate of normalized line tangential direction |
u<i> | i-th component of solution u |
ut<i> | derivative of i-th component of solution u with respect to t |
u<i>x<j> | derivative of i-th component of solution u with respect to j-th space direction x<j> |
ut<i>x<j> | derivative of i-th component of the t-derivative of solution u with respect to j-th space direction x<j> |
u<i>tau<k> | derivative of i-th component of solution u with respect to k-th area tangential direction tau<.><k> |
ut<i>tau<k> | derivative of i-th component of the t-derivative of solution u with respect to k-th area tangential direction tau<.><k> |
u<i>tau | derivative of i-th component of solution u with respect to line tangential direction tau<.> |
ut<i>tau | derivative of i-th component of the t-derivative of solution u with respect to line tangential direction tau<.> |
v<i> | i-th component of test function v |
v<i>x<j> | derivative of i-th component of test function v with respect to j-th space direction x<j> |
v<i>tau<k> | derivative of i-th component of test function v with respect to k-th area tangential direction tau<.><k> |
v<i>tau | derivative of i-th component of test function v with respect to line tangential direction tau<.> |
prevalue | value set by the mesh generator |
<parameter>=<expr>assigns the allowed expression <expr> to the parameter <parameter>. The name of the parameter may be a sequence of letters and digits starting with a letter. Reserved symbols and the function names must not be a substring of the declared parameter. The succession of the parameter declarations is free, but a recursive definition is not allowed. So for example the declaration of the first parameter can use the second parameter, but then the second parameter must not use the first parameter.
u0<i>=<expr0>where <expr0> is an allowed expression. After the insertion of the parameters the prescribed value for the initial condition must only depend on real constants, the available operators and the symbols x<i>. If there is no statement declaring a initial condition for component i, the statement 'u0<i>=0' is assumed. The initial solution is modified by VECFEM so that the Dirichlet conditions are fulfilled at the start time t0. In the case of steady problems, 'u0<i>=...' can be used to define an initial guess of the iteration solution algorithm.
u<i>=<exprd>where <exprd> is an allowed expression. The support D<i> of the Dirichlet conditions is specified by the FEM mesh. After the insertion of the parameters the prescribed value for the Dirichlet conditions must only depend on real constants, the available operators and the symbols x<i>, t and prevalue, which is the real value assigned to component i by the FEM mesh. If there is no statement declaring a Dirichlet condition for component i, but the D<i> is nonvoid, the statement 'u<i>=0' is assumed.
The functional equations [1] and [3] are described by the statement:
volume{<exprv>}+area{<expra>}+line{<exprl>}+point{<exprp>}=0or for the variational problem [2]
volume{<exprv>}+area{<expra>}+line{<exprl>}+point{<exprp>}=minimizewhere <exprv> denotes the kernel of the volume integration, <expra> the kernel of the area integration, <exprl> the kernel of the line integration and <exprp> the terms of the sum over specified points.
For the 3-dimensional case DIM=3, the integration kernels <exprv>, <expra>, <exprl> and <exprp> are allowed expressions. After the insertion of the parameters, the kernels must only depend on real constants, the available operators and the following symbols:
SYMBOL | <exprv> | <expra> | <exprl> | <exprp> |
x<j> | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] |
tau<j><k> | - | [1],[2],[3] | - | - |
tau<j> | - | - | [1],[2],[3] | - |
u<i> | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] |
ut<i> | [3] | [3] | [3] | [3] |
u<i>x<j> | [1],[2],[3] | - | - | - |
ut<i>x<j> | [3] | - | - | - |
u<i>tau<k> | - | [1],[2],[3] | - | - |
ut<i>tau<k> | - | [3] | - | - |
u<i>tau | - | - | [1],[2],[3] | - |
ut<i>tau | - | - | [3] | - |
v<i> | [1],[3] | [1],[3] | [1],[3] | [1],[3] |
v<i>x<j> | [1],[3] | - | - | - |
v<i>tau<k> | - | [1],[3] | - | - |
v<i>tau | - | - | [1],[3] | - |
For the 2-dimensional case DIM=2, the integration kernels <expra>, <exprl> and <exprp> are allowed expressions. The volume integration is not allowed. After the insertion of the parameters, the kernels must only depend on real constants, the available operators and the following symbols:
SYMBOL | <expra> | <exprl> | <exprp> |
x<j> | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] |
tau<j> | - | [1],[2] | - |
u<i> | [1],[2],[3] | [1],[2],[3] | [1],[2],[3] |
ut<i> | [3] | [3] | [3] |
u<i>x<j> | [1],[2],[3] | - | - |
ut<i>x<j> | [3] | - | - |
ut<i>tau | - | [3] | - |
v<i> | [1],[3] | [1],[3] | [1],[3] |
v<i>x<j> | [1],[3] | - | - |
v<i>tau | - | [1],[3] | - |
For the 1-dimensional case DIM=1, the integration kernels <exprl> and <exprp> are allowed expressions. The volume and area integrations are not allowed. After the insertion of the parameters, the kernels must only depend on real constants, the available operators and the following symbols:
SYMBOL | <exprl> | <exprp> |
x<j> | [1],[2],[3] | [1],[2],[3] |
u<i> | [1],[2],[3] | [1],[2],[3] |
ut<i> | [3] | [3] |
u<i>x<j> | [1],[2],[3] | - |
ut<i>x<j> | [3] | - |
v<i> | [1],[3] | [1],[3] |
v<i>x<j> | [1],[3] | - |
line quadrilateral triangle 4------7------3 3 | | | \ | | | \ | ^ | | ^ \ 8 | 6 6 | 5 | tau<.>2 | | tau<.>2 \ | | | | | \ --tau<.>--> | --tau<.>1-> | | --tau<.>1-> \ 1------3------2 1------5------2 1-------4------2
# # chr=0 for x1<=1 and chr=1 x1>1 # chr=1./(1.+exp(-100*(x1-1.)) # # / 900. x1<=1. # k=| for = thermal conductivity # \ 1. x1>1. # k= chr * 900. + (1-chr) * 1. # # no heat generation: # qb=0 # # convection boundary condition: # qs= (u1 - 20) ^ 2 # # the prescribed temperature is given by the input file: # u1=prevalue # # and here is the variational problem: # volume { k/2 * ( u1x1^2 + u1x2^2 ) - qb*u1 } + area { qs/2 } = minimalThe second example is the time-dependent 3-dimensional Navier-Stokes equation, see vembuild. The components 1, 2 and 3 are the velocity and the fourth component is the pressure:
# # the Reynolds number: # Re=10. # # the input and output profile is a parabolic profile : # u1=(1.-x1)*x1 u2=0. u3=0. u4=1. # # the initial solution : # u01=0. u02=0. u03=0. u04=1. # volume{ # # the first momentum equation # v1*u1t+v1x1*u1x1+v1x2*u1x2+v1x3*u1x3 + Re*v1*(u1*u1x1+u2*u1x2+u3*u1x3)+ v1x1*u4 + # # the second momentum equation # v2*u2t+v2x1*u2x1+ v2x2*u2x2+ v2x3*u2x3 + Re*v2*(u1*u2x1+u2*u2x2+u3*u2x3)+ v2x2*u4 + # # the third momentum equation # v3*u3t+v3x1*u3x1+ v3x2*u3x2+ v3x3*u3x3 + Re*v3*(u1*u3x1+u2*u3x2+u3*u3x3)+ v3x3*u4 + # # the equation of continuity # -v4*(u1x1+u2x2+u3x3) }=0