Header
CHECK KEYWORDS Warn
Mesh DB "." "square"
End
! equation coefficients (g*r+ux*dx+uy*dy=f)
! -----------------------------------------
$ function g(c) { _g = 1+8*c(0)*c(1)^2 }
$ function ux(c) { _ux = 2-(2*c(1)-1)^2 }
$ function uy(c) { _uy = 3-2*c(0) }
! analytical result and its spatial derivatives:
! ----------------------------------------------
$ function r(c) { _r = 1+sin(pi*c(0)*c(1)^2) }
$ function dx(c) { x=c(0); y=c(1); _dx = pi*y^2*cos(pi*x*y^2) }
$ function dy(c) { x=c(0); y=c(1); _dy = pi*x*2*y*cos(pi*x*y^2) }
Simulation
Max Output Level = 7
Coordinate System = "Cartesian"
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady
Steady State Max Iterations = 1
Output Intervals = 1
Post File = "DGsolution.vtu"
vtu: Discontinuous Galerkin = Logical True
End
Constants
End
Body 1
Equation = 1
Material = 1
Body force = 1
End
Equation 1
Active Solvers(1) = 1
Convection = constant
End
Material 1
Convection Velocity 1 = Variable Coordinate
Real MATC "ux(tx)"
Convection Velocity 2 = Variable Coordinate
Real MATC "uy(tx)"
Tracer Gamma = Variable Coordinate
Real MATC "g(tx)"
End
Solver 1
Equation = "AdvReact"
Procedure = File "AdvectionReaction" "AdvectionReactionSolver"
Variable = "Tracer"
Discontinuous Galerkin = True
! Discontinuous bodies = True
Optimize Bandwidth = False
! Linear System Save = True
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 1000
Linear System Preconditioning = ILU0
Linear System Convergence Tolerance = 1.0e-6
Nonlinear System Max Iterations = 1
Nonlinear System Consistent Norm = True
Calculate Nodal Average = Logical True
End
Body Force 1
Tracer Source = Variable Coordinate
Real MATC "r(tx)*g(tx)+ux(tx)*dx(tx)+uy(tx)*dy(tx)"
End
Boundary Condition 1
Target Boundaries(4) = 1 2 3 4
Tracer = Variable Coordinate
Real MATC "r(tx)"
End
Solver 1 :: Reference Norm = Real 1.41411703815
Solver 1 :: Reference Norm Tolerance = Real 1.0e-3