The Weak Form PDE
The Weak Form PDE provides a general interface for specifying and solving PDEs in the weak form.
The weak form does not define any coefficients and does not even separate the different equations in a system of equations. When specifying a PDE and its boundary conditions in the weak form, you specify contributions to a generic weak-form equation, which for a 3D model reads:
(16-9)
This weak equation has
N3 domain contributions Wi3, each integrated over domain selection Ωi
N2 boundary contributions Wj2, each integrated over boundary selection δΩj
N1 edge contributions Wk1, each integrated over edge selection δ2Ωk
N0 point contributions Wm0, each summed over point selection δ3Ωm
To specify Equation 16-8, in 3D, identify N3 = N2 = 1, N1 = N0 = 0, W13 = ∇υ⋅Γ + υf, and W12= = υG, and get
(16-10)
Note that all contributions are summed into the same integral equation without any particular order. Therefore, whether you write two equations in separate contributions or sum them into one single contribution normally does not matter. There is, however, a small caveat: the index on dVi, dAj, and dLk indicate that each contribution may be integrated in a different way. The integration can be performed with respect to either material or spatial coordinates and, in addition, using different numerical quadrature orders. But while working inside a single PDE interface, all contributions are integrated in the same way.
Using the Test Operator
When specifying a weak contribution, you may use all variables normally available for evaluation in equation contributions and during postprocessing. This includes independent variables (coordinates), dependent variables and their derivatives, and other predefined and user-defined variables, parameters and constants. In addition, you must use the test operator to distinguish between test functions and the solution.
The test operator must always occur linearly in each weak form contribution. Contributions or terms without any test operator are ignored, while terms nonlinear in the test operator are considered an error.
In many cases, it is sufficient to let the test operator act directly on the dependent variables and their derivatives. For example, the weak form of Equation 16-10 in two dimensions is
test(u)*f+(Gammax*test(ux)+Gammay*test(uy))
on the domain level, and
test(u)*G
on the boundary level. Gammax and Gammay are variables representing the components of Γ, and f and G are variables representing f and G, respectively.
In some cases, it is more convenient to insert an expression or user-defined variable into the test function. One example of this is geometrically nonlinear solid mechanics, where the weak form can be written as a sum of terms S_i*test(E_i), where S_i is a stress measure and E_i its conjugate strain measure.
When a nonlinear expression — for example, a Green-Lagrange strain — is inserted into the test operator, the operator acts as a linear differential operator. This means that the argument expression is effectively first differentiated with respect to each dependent variable it contains, and the results are then multiplied by the test function of the corresponding variable. Therefore, the heat equation may alternately be implemented as q*test(u)-0.5*k*test(ux^2+uy^2). Using the chain rule on the second term with the test operator as the differential operator returns the standard weak form of the equation given above.
In another example, test(F(u, ∇u)), the test operator is equivalent to:
for all dependent variables ui.