Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
fenicsR13
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lambert Theisen
fenicsR13
Commits
e2798235
Commit
e2798235
authored
Feb 08, 2020
by
Lambert Theisen
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new R13 P2P1P2P1P1 testcase with validation tests
parent
8a35a97a
Changes
3
Hide whitespace changes
Inline
Sidebyside
Showing
3 changed files
with
170 additions
and
0 deletions
+170
0
tests/r13/inputs/r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab.yml
...r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab.yml
+127
0
tests/r13/referrors/r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab/errors.csv
...oeffs_nosources_norot_inflow_p1p2p1p1p2_nostab/errors.csv
+6
0
tests/r13/test_r13_convergence.py
tests/r13/test_r13_convergence.py
+37
0
No files found.
tests/r13/inputs/r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab.yml
0 → 100644
View file @
e2798235
# General
# =======
#  output_folder: Used as output folder
output_folder
:
r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab
# Meshes
# ======
#  meshes: List of input meshes in h5 format to run simulations on
meshes
:

../mesh/ring0.h5

../mesh/ring1.h5

../mesh/ring2.h5

../mesh/ring3.h5

../mesh/ring4.h5
#  ../mesh/ring5.h5
#  ../mesh/ring6.h5
#  ../mesh/ring7.h5
#  ../mesh/ring8.h5
# Numerical Parameters
# ====================
#  elements: Must contain the fields: theta, s, p, u, sigma
#  fields: List of FEM parameters (shape, degree)
#  shape: Element shape, e.g. Lagrange
#  degree: Element degree, e.g. 2
#  stabilization: Must contain cip
#  cip: Collection of Continous Interior Penalty (CIP) parameters
#  enable: Enable CIP stabilization
#  delta_theta: Stabilization of grad(T)*grad(T_test) over edge
#  delta_u: Stabilization of grad(u)*grad(u_test) over edge
#  delta_p: Stabilization of grad(p)*grad(p_test) over edge
elements
:
theta
:
shape
:
Lagrange
degree
:
1
s
:
shape
:
Lagrange
degree
:
2
p
:
shape
:
Lagrange
degree
:
1
u
:
shape
:
Lagrange
degree
:
1
sigma
:
shape
:
Lagrange
degree
:
2
stabilization
:
cip
:
enable
:
False
delta_theta
:
1.0
delta_u
:
1.0
delta_p
:
0.01
# Formulation Parameters
# ======================
#  nsd: Number of spatial dimensions == 2
#  mode: Formulation mode, one of heat, stress, r13
#  kn: Knudsen numberkn
#  chi_tilde: Refaction coefficient in Maxwell accomodation model
#  heat_source: Heat source function for mode==heatr13
#  mass_source: Mass source function for mode==stressr13
#  body_force: Body force for mode==stressr13
nsd
:
2
mode
:
r13
kn
:
1.0
chi_tilde
:
1.0
heat_source
:
0
mass_source
:
0
body_force
:
[
0
,
0
]
# Boundary Conditions
# ===================
#  bcs: Dictionary of all boundary IDs from mesh
#  bc_id: must contain theta_w, u_t_w, u_n_w, p_w, epsilon_w
#  theta_w: Value for temperature at wall
#  u_t_w: Value for tangential velocity at wall
#  u_n_w: Value for normal velocity at wall
#  p_w: Value for pressure at wall
#  epsilon_w: Inflowmodel parameter <=> Weight of pressure prescription
bcs
:
3000
:
theta_w
:
1
u_t_w
:
0
u_n_w
:
0
p_w
:
0
epsilon_w
:
pow(10,3)
3100
:
theta_w
:
2
u_t_w
:
1.00 * sin(phi)
u_n_w
:
+1.00 * cos(phi)
p_w
:
0.27 * cos(phi)
epsilon_w
:
pow(10,+3)
# Convergence Study
# =================
#  enable: Enable convergence study on given meshes
#  exact_solution: Path to exact solution in cppformat to compare errors
#  plot: Show errors in matplotlib window. PDF output is always per default.
#  write_systemmatrix: Writes out systemmatrix (LHS) to use for analysis
#  rescale_pressure: Rescale numerical pressure result to have zero mean
#  relative_errors: Use relative errors. If exact sol. is zero, use absolute.
convergence_study
:
enable
:
True
exact_solution
:
esols/1_coeffs_nosources_norot_inflow.cpp
plot
:
False
write_systemmatrix
:
False
rescale_pressure
:
False
relative_error
:
True
# Postprocessing
# ==============
#  write_pdfs: Write all solution fields as PDF plot
#  massflow: List of BC IDs to compute massflow J=int_bc dot(u,n) ds
postprocessing
:
write_pdfs
:
False
massflow
:
[]
# Parameter Study
# ==============
#  enable: Repeat simulation with different p. values (study)
#  parameter_key: Key as list, e.g. ["elemenets", "p", "degree"]
#  parameter_values: List of value for parameter, e.g. [0.01,0.1,1,10]
parameter_study
:
enable
:
False
parameter_key
:
[]
parameter_values
:
[]
\ No newline at end of file
tests/r13/referrors/r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab/errors.csv
0 → 100644
View file @
e2798235
h,theta_L_2,theta_l_inf,sx_L_2,sx_l_inf,sy_L_2,sy_l_inf,p_L_2,p_l_inf,ux_L_2,ux_l_inf,uy_L_2,uy_l_inf,sigmaxx_L_2,sigmaxx_l_inf,sigmaxy_L_2,sigmaxy_l_inf,sigmayy_L_2,sigmayy_l_inf
0.9886573325052778,0.0143768913243,0.0167763774855,0.154427796117,0.212905569859,0.170021307007,0.189184423016,0.222665842777,0.38785328282,0.946625073133,0.567225546841,0.310747128191,0.414217805868,0.376671752432,0.462493535845,0.833076883105,0.836036693911,0.546864985397,0.607810788706
0.6340332990709842,0.0207579137652,0.0367173799369,0.169037418712,0.248093709767,0.163463969828,0.130693891918,0.665027312211,0.8072723145,2.01920543274,0.91507796314,0.701235155631,0.781210911785,1.47078769847,1.04351764263,1.49146487718,1.08353617431,2.00889778669,1.3755469062
0.32904683851469807,0.0130451011078,0.0214463940876,0.11719988638,0.135578567567,0.0945258805968,0.0635837546267,0.478092455792,0.458272915175,1.30107452488,0.646522741078,0.454477192923,0.649877565913,0.875180306235,0.718588084973,1.07272217111,0.790755661626,1.03959737869,0.753488608423
0.16754966839339377,0.00244245700739,0.00484554351159,0.0224211862256,0.0282299306717,0.0191812627504,0.0141904437469,0.0888811739689,0.0840260609066,0.220940884681,0.113340275219,0.0826896049548,0.151911670261,0.155970621267,0.128324961683,0.195690972003,0.153115738912,0.190054619914,0.139421512179
0.08734460120995041,0.000595068041661,0.00121440933827,0.0055147176246,0.00700562569891,0.00471691302173,0.00347684971707,0.0217752311678,0.0216173663209,0.0531285069094,0.0331765062864,0.0204957947248,0.0441530177482,0.0379894104042,0.0316570167234,0.0479717016566,0.0387767133382,0.0457767021787,0.0339001090382
tests/r13/test_r13_convergence.py
View file @
e2798235
...
...
@@ 161,3 +161,40 @@ class TestR13Convergence(object):
errors
=
name
+
"/"
+
"errors.csv"
referrors
=
"referrors/"
+
name
+
"/errors.csv"
self
.
compare_errors
(
errors
,
referrors
)
def
test_r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab
(
self
):
r"""
Execute full linear R13 system test and check with reference errors.
Use Generalized TaylorHood elements (P2P1P2P1P1) w.o. stabilization.
Test case is similar to [TOR2017]_.
.. [TOR2017] Torrilhon, M. et al. (2017). “Hierarchical Boltzmann
simulations and model error estimation”. In: Journal of
Computational Physics 342 (2017), pp. 66–84.
==================== ===================================================
Parameter Value
==================== ===================================================
:math:`Kn` :math:`1.0`
:math:`\dot{m}` :math:`0`
:math:`r` :math:`0`
:math:`\theta_w^1` :math:`1.0`
:math:`v_t^1` :math:`0`
:math:`v_n^1` :math:`0`
:math:`p_w^1` :math:`0`
:math:`\epsilon_w^1` :math:`10^{3}`
:math:`\theta_w^2` :math:`2.0`
:math:`v_t^2` :math:`1.00 \sin(\phi)`
:math:`v_n^2` :math:`+1.00 \cos(\phi)`
:math:`p_w^2` :math:`0.27 \cos(\phi)`
:math:`\epsilon_w^2` :math:`10^{3}`
Elements :math:`P_1P_2P_1P_1P_2`
Stabilization Off
==================== ===================================================
"""
name
=
"r13_1_coeffs_nosources_norot_inflow_p1p2p1p1p2_nostab"
self
.
run_solver
(
"inputs/"
+
name
+
".yml"
)
errors
=
name
+
"/"
+
"errors.csv"
referrors
=
"referrors/"
+
name
+
"/errors.csv"
self
.
compare_errors
(
errors
,
referrors
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment