Skip to content

Commit d6e89e0

Browse files
Merge pull request #330 from arcaneframework/mab/cartesian-mesh-elasticity
cartesian mesh example
2 parents e274356 + aae9654 commit d6e89e0

File tree

5 files changed

+170
-0
lines changed

5 files changed

+170
-0
lines changed

modules/elasticity/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,19 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
104104
-A,//fem/solution-comparison-file=check/elasticity_traction_bodyforce_bar.quad.txt
105105
inputs/bar.2D.traction.bodyforce.quad.arc)
106106

107+
add_test(NAME [elasticity]2D_Dirichlet_cartesian COMMAND Elasticity
108+
-A,//fem/solution-comparison-file=check/bar.2D.cartesian.Dirichlet.bodyForce.txt
109+
inputs/bar.2D.cartesian.Dirichlet.bodyForce.arc)
110+
107111
add_test(NAME [elasticity]bar_parse_and_exit COMMAND Elasticity
108112
-A,//fem/assemble-linear-system=false
109113
-A,//fem/solve-linear-system=false
110114
inputs/bar.2D.arc)
111115

116+
add_test(NAME [elasticity]3D_Dirichlet_cartesian COMMAND Elasticity
117+
-A,//fem/solution-comparison-file=check/bar.3D.cartesian.Dirichlet.bodyForce.txt
118+
inputs/bar.3D.cartesian.Dirichlet.bodyForce.arc)
119+
112120
add_test(NAME [elasticity]3D_Dirichlet_bodyforce_hexa COMMAND Elasticity
113121
-A,//fem/solution-comparison-file=check/3D_dirichlet_bodyforce.hexa.txt
114122
inputs/3D.dirichlet.bodyforce.hexa.arc)
@@ -175,6 +183,14 @@ if(FEMUTILS_HAS_SOLVER_BACKEND_PETSC)
175183
-A,//fem/solution-comparison-file=check/test_elasticity_results.txt
176184
-A,//fem/boundary-conditions/dirichlet/enforce-Dirichlet-method=RowColumnElimination
177185
inputs/bar.2D.arc)
186+
187+
add_test(NAME [elasticity]Dirichlet_cartesian_2p COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity
188+
-A,//fem/solution-comparison-file=check/bar.2D.cartesian.Dirichlet.bodyForce.txt
189+
inputs/bar.2D.cartesian.Dirichlet.bodyForce.arc)
190+
191+
add_test(NAME [elasticity]3D_Dirichlet_cartesian_2p COMMAND ${MPIEXEC_EXECUTABLE} -n 2 ./Elasticity
192+
-A,//fem/solution-comparison-file=check/bar.3D.cartesian.Dirichlet.bodyForce.txt
193+
inputs/bar.3D.cartesian.Dirichlet.bodyForce.arc)
178194
endif()
179195
endif()
180196

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
0 8.0064062295911014e-27 2.3723021327985032e-27 0
2+
1 0.013756891762350012 0.01555698911366124 0
3+
2 0.026630517653400913 0.056641823869228065 0
4+
3 0.037861469054070479 0.12208424832924299 0
5+
4 0.047623935376293447 0.20846213351173193 0
6+
5 0.055877962062811419 0.31286987231106073 0
7+
6 0.062632713632189238 0.43228338075322031 0
8+
7 0.067886087986112079 0.56370575038597281 0
9+
8 0.071638567304731254 0.70413383944683405 0
10+
9 0.073890040922272957 0.85056593573339989 0
11+
10 0.0746405345125635 0.99999999999999989 0
12+
11 -4.4120682326440819e-32 -3.943987464834752e-27 0
13+
12 -3.8374894682216023e-08 0.013908908563276439 0
14+
13 -7.7035651517652771e-08 0.055551171208090257 0
15+
14 -1.096545898259127e-07 0.12104513703688911 0
16+
15 -1.3822488462103379e-07 0.20759060089421802 0
17+
16 -1.6235808939650968e-07 0.31213930241909726 0
18+
17 -1.8210643745415583e-07 0.43169987858846243 0
19+
18 -1.9746662455268483e-07 0.56326791563159384 0
20+
19 -2.0843800511248949e-07 0.70384199325425756 0
21+
20 -2.150208705316076e-07 0.8504200046321797 0
22+
21 -2.172151555115487e-07 0.99999999999999989 0
23+
22 -8.0064571089083509e-27 2.3723284992874597e-27 0
24+
23 -0.013756970737749631 0.015557007345367153 0
25+
24 -0.026630670507927019 0.056641837208414474 0
26+
25 -0.037861688086121711 0.12208426027924697 0
27+
26 -0.047624211379992454 0.20846214376045599 0
28+
27 -0.055878286353389386 0.31286988084173539 0
29+
28 -0.062633077418684707 0.43228338758039653 0
30+
29 -0.067886482492577255 0.56370575550590607 0
31+
30 -0.071638983754100286 0.70413384286017155 0
32+
31 -0.073890470537343725 0.85056593744006748 0
33+
32 -0.074640968516208342 0.99999999999999989 0
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
0 7.7700902941794504e-29 2.2618243469203384e-29 6.8768219899362665e-29
2+
1 0.013491379687793507 0.014841847772143174 0.0010392840652825876
3+
2 0.026487552677058813 0.055573881744004898 0.00069720853324282603
4+
3 0.03780008825370821 0.12077651558682061 0.00065738990125176872
5+
4 0.047626001162942119 0.20707334643407968 0.00055414244167348379
6+
5 0.055938431044721869 0.31152070998513282 0.00046345832897524178
7+
6 0.062739193294142473 0.43107805513225761 0.00037060350498843822
8+
7 0.068028931970547629 0.56272669968228561 0.00027750151629013948
9+
8 0.071807576108579865 0.70344375882423915 0.00018714835578265493
10+
9 0.07407116857037381 0.85020321070525695 8.4492338780060229e-05
11+
10 0.074848749700326178 0.99999999999999989 3.4364118296371063e-05
12+
11 -4.7428417705605954e-34 -3.8217941461143502e-29 -6.1701766633215602e-34
13+
12 -4.0653523802303174e-08 0.013705502884576091 -2.991485050399951e-09
14+
13 -8.2451067674128873e-08 0.05480730849186019 -2.0283340543796139e-09
15+
14 -1.1792762219475829e-07 0.12005196691654471 -1.880878014982167e-09
16+
15 -1.4890186882805437e-07 0.20646465248651025 -1.5990079645346629e-09
17+
16 -1.7509558945790663e-07 0.31101051313111644 -1.3331030061557807e-09
18+
17 -1.9652182209573149e-07 0.43067064791242937 -1.0670485689632048e-09
19+
18 -2.1318949793250934e-07 0.56242085531052988 -7.9869382677107955e-10
20+
19 -2.2509497339821189e-07 0.7032402945649936 -5.3921149441978913e-10
21+
20 -2.3222330566642148e-07 0.85010048641232516 -2.4001641117945786e-10
22+
21 -2.347023329246417e-07 0.99999999999999989 -1.160730340042225e-10
23+
22 -7.7701428904771305e-29 2.2618510404308142e-29 -6.8768845000910579e-29
24+
23 -0.013491462752890808 0.014841861746983624 -0.0010392900287751355
25+
24 -0.026487716662484943 0.055573892290116965 -0.00069721247569551055
26+
25 -0.037800323865188196 0.12077652488575356 -0.000657393725548357
27+
26 -0.047626298629392425 0.20707335444826938 -0.00055414561894466074
28+
27 -0.055938780900207305 0.311520716649129 -0.00046346100045270339
29+
28 -0.06273958600558828 0.43107806046555186 -0.00037060563792665782
30+
29 -0.06802935801501156 0.56272670368358257 -0.00027750311394563918
31+
30 -0.071808025967182026 0.70344376148564336 -0.00018714943437251857
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0"?>
2+
<case codename="Elasticity" xml:lang="en" codeversion="1.0">
3+
<arcane>
4+
<title>2D Linear Elasticity With Cartesian Mesh</title>
5+
<timeloop>ElasticityLoop</timeloop>
6+
</arcane>
7+
8+
<arcane-post-processing>
9+
<output-period>1</output-period>
10+
<output>
11+
<variable>U</variable>
12+
</output>
13+
</arcane-post-processing>
14+
15+
<meshes>
16+
<mesh>
17+
<generator name="Cartesian2D" >
18+
<nb-part-x>2</nb-part-x>
19+
<nb-part-y>1</nb-part-y>
20+
<origin>0.0 0.0</origin>
21+
<generate-sod-groups>true</generate-sod-groups>
22+
<x><n>10</n><length>1.0</length></x>
23+
<y><n>2</n><length>0.1</length></y>
24+
</generator>
25+
</mesh>
26+
</meshes>
27+
28+
<fem>
29+
<hex-quad-mesh>true</hex-quad-mesh>
30+
<E>21.0e5</E>
31+
<nu>0.28</nu>
32+
<f>-1.0 NULL</f>
33+
<boundary-conditions>
34+
<dirichlet>
35+
<surface>XMIN</surface>
36+
<value>0.0 0.0</value>
37+
</dirichlet>
38+
<dirichlet>
39+
<surface>XMAX</surface>
40+
<value>NULL 1.0</value>
41+
</dirichlet>
42+
</boundary-conditions>
43+
</fem>
44+
</case>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0"?>
2+
<case codename="Elasticity" xml:lang="en" codeversion="1.0">
3+
<arcane>
4+
<title>3D Linear Elasticity With Cartesian Mesh</title>
5+
<timeloop>ElasticityLoop</timeloop>
6+
</arcane>
7+
8+
<arcane-post-processing>
9+
<output-period>1</output-period>
10+
<output>
11+
<variable>U</variable>
12+
</output>
13+
</arcane-post-processing>
14+
15+
<meshes>
16+
<mesh>
17+
<generator name="Cartesian3D" >
18+
<nb-part-x>2</nb-part-x>
19+
<nb-part-y>1</nb-part-y>
20+
<nb-part-z>1</nb-part-z>
21+
<origin>0.0 0.0 0.0</origin>
22+
<generate-sod-groups>true</generate-sod-groups>
23+
<x><n>10</n><length>1.0</length></x>
24+
<y><n>2</n><length>0.1</length></y>
25+
<z><n>2</n><length>0.04</length></z>
26+
</generator>
27+
</mesh>
28+
</meshes>
29+
30+
<fem>
31+
<hex-quad-mesh>true</hex-quad-mesh>
32+
<E>21.0e5</E>
33+
<nu>0.28</nu>
34+
<f>-1.0 NULL NULL</f>
35+
<boundary-conditions>
36+
<dirichlet>
37+
<surface>XMIN</surface>
38+
<value>0.0 0.0 0.0</value>
39+
</dirichlet>
40+
<dirichlet>
41+
<surface>XMAX</surface>
42+
<value>NULL 1.0 NULL</value>
43+
</dirichlet>
44+
</boundary-conditions>
45+
</fem>
46+
</case>

0 commit comments

Comments
 (0)