1
<?xml version='1.0' encoding='utf-8'?>
4
<string_value lines="1">cdg</string_value>
7
<string_value lines="1">fluids</string_value>
11
<integer_value rank="0">3</integer_value>
13
<mesh name="CoordinateMesh">
14
<from_file file_name="box">
15
<format name="triangle"/>
21
<mesh name="VelocityMesh">
23
<mesh name="CoordinateMesh"/>
26
<integer_value rank="0">1</integer_value>
30
<string_value>discontinuous</string_value>
37
<mesh name="PressureMesh">
39
<mesh name="CoordinateMesh"/>
47
<integer_value rank="0">4</integer_value>
53
<string_value>vtk</string_value>
57
<real_value rank="0">500.0</real_value>
60
<output_mesh name="VelocityMesh"/>
65
<real_value rank="0">0</real_value>
68
<real_value rank="0">0.05</real_value>
71
<real_value rank="0">1.0e-10</real_value>
75
<real_value rank="0">1.E-6</real_value>
80
<physical_parameters/>
81
<material_phase name="Stuff">
82
<vector_field name="Velocity" rank="1">
84
<mesh name="VelocityMesh"/>
85
<value name="WholeMesh">
87
<real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
88
<comment>def val(XX, t):
89
from math import sin,cos
96
u = sin(5*(x2+y2+z2));
97
v = cos(3*(x2-y2+z2));
98
w = sin(3*(-x2-y2+z2));
99
return (u, v, w)</comment>
107
<exclude_from_detectors/>
111
<scalar_field name="NumericalSolution" rank="0">
113
<mesh name="VelocityMesh"/>
114
<equation name="AdvectionDiffusion"/>
115
<spatial_discretisation>
116
<discontinuous_galerkin>
119
<integrate_advection_by_parts>
121
</integrate_advection_by_parts>
124
<compact_discontinuous_galerkin/>
127
<exclude_mass_terms/>
129
</discontinuous_galerkin>
130
<conservative_advection>
131
<real_value rank="0">0.0</real_value>
132
</conservative_advection>
133
</spatial_discretisation>
134
<temporal_discretisation>
136
<real_value rank="0">1.0</real_value>
138
</temporal_discretisation>
140
<iterative_method name="cg"/>
141
<preconditioner name="mg"/>
143
<real_value rank="0">1.E-10</real_value>
146
<integer_value rank="0">10000</integer_value>
149
<never_ignore_solver_failures/>
154
<initial_condition name="WholeMesh">
156
<real_value rank="0">0</real_value>
159
<boundary_conditions name="Diriclet">
161
<integer_value shape="5" rank="1">28 29 30 31 32</integer_value>
163
<type name="dirichlet">
165
<boundary_overwrites_initial_condition/>
168
<string_value lines="20" type="code" language="python">def val(XX, t):
173
u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
174
return u</string_value>
177
</boundary_conditions>
178
<boundary_conditions name="inhomogeneous_Neumann_on_x_normal_boundary_surface">
180
<integer_value shape="1" rank="1">33</integer_value>
182
<type name="neumann">
184
<string_value lines="20" type="code" language="python">def val(XX, t):
189
u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)*(0.5-x)
190
return u</string_value>
193
</boundary_conditions>
194
<tensor_field name="Diffusivity" rank="2">
196
<value name="WholeMesh">
199
<real_value rank="0">1.0</real_value>
206
<scalar_field name="Source" rank="0">
208
<value name="WholeMesh">
210
<string_value lines="20" type="code" language="python">def val(XX, t):
215
T = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
216
S = (3 - (x-0.5)**2 - (y-0.5)**2 - (z-0.5)**2)*T
217
return S</string_value>
218
<comment>sage: T(x,y,z,t,nu,adv,beta,omega) = sin(25*x*y*z + omega*t) - 2*(y+z)/(sqrt(x*z+1.0))
219
sage: T_t = diff(T,t)
220
sage: T_x = diff(T,x)
221
sage: T_y = diff(T,y)
222
sage: T_z = diff(T,z)
223
sage: T_xx = diff(T_x,x)
224
sage: T_yy = diff(T_y,y)
225
sage: T_zz = diff(T_z,z)
227
sage: u(x,y,z,t) = sin(5*(x^2+y^2+z^2))
228
sage: v(x,y,z,t) = cos(3*(x^2-y^2+z^2))
229
sage: w(x,y,z,t) = sin(3*(-x^2-y^2+z^2))
231
sage: u_x = diff(u,x)
232
sage: u_y = diff(u,y)
233
sage: u_z = diff(u,z)
234
sage: v_x = diff(v,x)
235
sage: v_y = diff(v,y)
236
sage: v_z = diff(v,z)
237
sage: w_x = diff(w,x)
238
sage: w_y = diff(w,y)
239
sage: w_z = diff(w,z)
241
sage: S = T_t + adv*(u*T_x + v*T_y + w*T_z + beta*(T*(u_x + v_y + w_z))) - nu*(T_xx + T_yy + T_zz)
245
(x, y, z, t, nu, adv, beta, omega) |--> -(2*(2*(y + z)/sqrt(x*z + 1.00000000000000) - sin(25*x*y*z + omega*t))*(5*x*cos(5*x^2 + 5*y^2 + 5*z^2) + 3*y*sin(3*x^2 - 3*y^2 + 3*z^2) + 3*z*cos(-3*x^2 - 3*y^2 + 3*z^2))*beta - (25*y*z*cos(25*x*y*z + omega*t) + (y + z)*z/(x*z + 1.00000000000000)^(3/2))*sin(5*x^2 + 5*y^2 + 5*z^2) - (25*x*z*cos(25*x*y*z + omega*t) - 2/sqrt(x*z + 1.00000000000000))*cos(3*x^2 - 3*y^2 + 3*z^2) - (25*x*y*cos(25*x*y*z + omega*t) + (y + z)*x/(x*z + 1.00000000000000)^(3/2) - 2/sqrt(x*z + 1.00000000000000))*sin(-3*x^2 - 3*y^2 + 3*z^2))*adv + 1/2*(1250*x^2*y^2*sin(25*x*y*z + omega*t) + 1250*x^2*z^2*sin(25*x*y*z + omega*t) + 1250*y^2*z^2*sin(25*x*y*z + omega*t) + 3*(y + z)*x^2/(x*z + 1.00000000000000)^(5/2) + 3*(y + z)*z^2/(x*z + 1.00000000000000)^(5/2) - 4*x/(x*z + 1.00000000000000)^(3/2))*nu + omega*cos(25*x*y*z + omega*t)</comment>
251
<exclude_from_detectors/>
256
<include_previous_time_step/>
260
<include_in_convergence/>
263
<include_in_detectors/>
266
<include_in_steady_state/>
268
<consistent_interpolation/>
271
<scalar_field name="AnalyticalSolution" rank="0">
273
<mesh name="VelocityMesh"/>
274
<value name="WholeMesh">
276
<string_value lines="20" type="code" language="python">def val(XX, t):
281
u = exp(-((x-0.5)**2 + (y-0.5)**2 + (z-0.5)**2)/2)
282
return u</string_value>
288
<exclude_from_detectors/>
292
<scalar_field name="AbsoluteDifference" rank="0">
293
<diagnostic field_name_b="NumericalSolution" field_name_a="AnalyticalSolution">
294
<algorithm name="Internal" material_phase_support="multiple"/>
295
<mesh name="VelocityMesh"/>
299
<include_in_convergence/>
302
<include_in_detectors/>
305
<include_in_steady_state/>
309
<scalar_field name="DG_CourantNumber" rank="0">
311
<algorithm name="Internal" material_phase_support="multiple"/>
312
<mesh name="VelocityMesh"/>
316
<include_in_convergence/>
319
<include_in_detectors/>
322
<include_in_steady_state/>