-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81ff754
commit 27bb208
Showing
7 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/***************************************************************************** | ||
This file is a part of ArcaneFEM (finite element tool in Arcane) | ||
------------------------------------------------------------------- | ||
Author(s): Mohd Afeef Badri | ||
Email : [email protected] | ||
Date : 27-02-2024 | ||
------------------------------------------------------------------- | ||
This file is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; or without even the implied warranty | ||
of FITNESS FOR A PARTICULAR PURPOSE. | ||
-------------------------------------------------------------------- | ||
This is a Gmsh .geo file which produces 3D boolean geometry. The file | ||
is a copy of Gmsh's tutorial on boolean only groups have been added | ||
here. | ||
compile-run: gmsh -3 boolean.geo -format msh41 | ||
*******************************************************************************/ | ||
|
||
SetFactory("OpenCASCADE"); | ||
|
||
// from http://en.wikipedia.org/wiki/Constructive_solid_geometry | ||
|
||
Mesh.Algorithm = 6; | ||
Mesh.MeshSizeMin = 0.4; | ||
Mesh.MeshSizeMax = 0.4; | ||
|
||
R = DefineNumber[ 1.4 , Min 0.1, Max 2, Step 0.01, | ||
Name "Parameters/Box dimension" ]; | ||
Rs = DefineNumber[ R*.7 , Min 0.1, Max 2, Step 0.01, | ||
Name "Parameters/Cylinder radius" ]; | ||
Rt = DefineNumber[ R*1.25, Min 0.1, Max 2, Step 0.01, | ||
Name "Parameters/Sphere radius" ]; | ||
|
||
Box(1) = {-R,-R,-R, 2*R,2*R,2*R}; | ||
|
||
Sphere(2) = {0,0,0,Rt}; | ||
|
||
BooleanIntersection(3) = { Volume{1}; Delete; }{ Volume{2}; Delete; }; | ||
|
||
Cylinder(4) = {-2*R,0,0, 4*R,0,0, Rs}; | ||
Cylinder(5) = {0,-2*R,0, 0,4*R,0, Rs}; | ||
Cylinder(6) = {0,0,-2*R, 0,0,4*R, Rs}; | ||
|
||
BooleanUnion(7) = { Volume{4}; Delete; }{ Volume{5,6}; Delete; }; | ||
BooleanDifference(8) = { Volume{3}; Delete; }{ Volume{7}; Delete; }; | ||
|
||
Physical Surface("left", 42) = {4}; | ||
Physical Surface("right", 43) = {6}; | ||
Physical Surface("top", 44) = {7}; | ||
Physical Surface("bottom", 45) = {8}; | ||
Physical Surface("front", 46) = {5}; | ||
Physical Surface("back", 47) = {1}; | ||
Physical Volume("vol", 48) = {8}; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/***************************************************************************** | ||
This file is a part of ArcaneFEM (finite element tool in Arcane) | ||
------------------------------------------------------------------- | ||
Author(s): Mohd Afeef Badri | ||
Email : [email protected] | ||
Date : 27-02-2024 | ||
------------------------------------------------------------------- | ||
This file is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; or without even the implied warranty | ||
of FITNESS FOR A PARTICULAR PURPOSE. | ||
-------------------------------------------------------------------- | ||
This is a Gmsh .geo file which produces 3D boolean geometry. The file | ||
is a copy of Gmsh's tutorial on boolean only groups have been added | ||
here. | ||
compile-run: gmsh -3 pipe.geo -format msh41 | ||
*******************************************************************************/ | ||
|
||
SetFactory("OpenCASCADE"); | ||
|
||
Mesh.MeshSizeMin = 0.1; | ||
Mesh.MeshSizeMax = 0.1; | ||
Geometry.NumSubEdges = 100; // nicer display of curve | ||
|
||
nturns = DefineNumber[ 1, Min 0.1, Max 1, Step 0.01, Name "Parameters/Turn" ]; | ||
npts = 20; | ||
r = 1; | ||
rd = 0.1; | ||
h = 1 * nturns; | ||
|
||
For i In {0:npts-1} | ||
theta = i * 2*Pi*nturns/npts; | ||
Point(i + 1) = {r * Cos(theta), r * Sin(theta), i * h/npts}; | ||
EndFor | ||
|
||
Spline(1) = {1:npts}; | ||
Wire(1) = {1}; | ||
|
||
Disk(1) = {1,0,0, rd}; | ||
|
||
Rectangle(2) = {1+2*rd,-rd,0, 2*rd,2*rd,rd/5}; | ||
Rotate {{1, 0, 0}, {0, 0, 0}, Pi/2} { Surface{1,2}; } | ||
|
||
Extrude { Surface{1,2}; } Using Wire {1} | ||
Delete{ Surface{1,2}; } | ||
|
||
Physical Surface("leftSurfaceCircularPipe", 47) = {5}; | ||
Physical Surface("rightSurfaceCircularPipe", 48) = {3}; | ||
Physical Surface("leftSurfaceSquarePipe", 49) = {15}; | ||
Physical Surface("rightSurfaceSquarePipe", 50) = {6}; | ||
Physical Volume("SquarePipeVol", 51) = {1}; | ||
Physical Volume("CylindricalPipeVol", 52) = {2}; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Case configuration for a Fourier analysis simulation. | ||
This file includes settings for: | ||
- General simulation parameters | ||
- Mesh configuration details | ||
- Finite Element Method (FEM) configurations | ||
- Post-processing options | ||
--> | ||
<case codename="Fourier" xml:lang="en" codeversion="1.0"> | ||
|
||
<!-- | ||
Arcane-specific settings: | ||
- title: Descriptive name for the simulation case. | ||
- timeloop: Specifies the time-stepping loop used in this Fourier simulation. | ||
--> | ||
<arcane> | ||
<title>Fouriers equation FEM code</title> | ||
<timeloop>FourierLoop</timeloop> | ||
</arcane> | ||
|
||
<!-- | ||
Mesh configuration: | ||
- filename: The path to the mesh file used in the simulation. | ||
--> | ||
<meshes> | ||
<mesh> | ||
<filename>meshes/boolean.msh</filename> | ||
</mesh> | ||
</meshes> | ||
|
||
<!-- | ||
FEM (Finite Element Method) settings: | ||
- lambda: Thermal conductivity or diffusivity coefficient. | ||
- qdot: Heat source term or volumetric heat generation. | ||
- result-file: File where simulation results will be saved. | ||
- boundary-conditions: Defines the boundary conditions for the simulation. | ||
- dirichlet: Fixed value boundary condition with penalty enforcement for specified surfaces. | ||
- neumann: Flux or gradient boundary condition for specified surfaces. | ||
--> | ||
<fem> | ||
<lambda>23.5</lambda> | ||
<qdot>1.123e-2</qdot> | ||
<mesh-type>TETRA4</mesh-type> | ||
<boundary-conditions> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>left</surface> | ||
<value>55.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>right</surface> | ||
<value>12.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>top</surface> | ||
<value>166.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>bottom</surface> | ||
<value>32.0</value> | ||
</dirichlet> | ||
<neumann> | ||
<surface>front</surface> | ||
<value>56.0</value> | ||
</neumann> | ||
<neumann> | ||
<surface>back</surface> | ||
<value>3.67</value> | ||
</neumann> | ||
</boundary-conditions> | ||
</fem> | ||
|
||
<!-- | ||
Post-processing settings: | ||
- output-period: Defines how often (in simulation steps) the output is generated. | ||
- format: Specifies the post-processing format, here using VtkHdfV2. | ||
- output: Defines the variables to be included in the post-processing output. | ||
--> | ||
<arcane-post-processing> | ||
<output-period>1</output-period> | ||
<output> | ||
<variable>U</variable> | ||
</output> | ||
</arcane-post-processing> | ||
|
||
</case> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Case configuration for a Fourier analysis simulation. | ||
This file includes settings for: | ||
- General simulation parameters | ||
- Mesh configuration details | ||
- Finite Element Method (FEM) configurations | ||
- Post-processing options | ||
--> | ||
<case codename="Fourier" xml:lang="en" codeversion="1.0"> | ||
|
||
<!-- | ||
Arcane-specific settings: | ||
- title: Descriptive name for the simulation case. | ||
- timeloop: Specifies the time-stepping loop used in this Fourier simulation. | ||
--> | ||
<arcane> | ||
<title>Fouriers equation FEM code</title> | ||
<timeloop>FourierLoop</timeloop> | ||
</arcane> | ||
|
||
<!-- | ||
Mesh configuration: | ||
- filename: The path to the mesh file used in the simulation. | ||
--> | ||
<meshes> | ||
<mesh> | ||
<filename>meshes/pipe.msh</filename> | ||
</mesh> | ||
</meshes> | ||
|
||
<!-- | ||
FEM (Finite Element Method) settings: | ||
- lambda: Thermal conductivity or diffusivity coefficient. | ||
- qdot: Heat source term or volumetric heat generation. | ||
- result-file: File where simulation results will be saved. | ||
- boundary-conditions: Defines the boundary conditions for the simulation. | ||
- dirichlet: Fixed value boundary condition with penalty enforcement for specified surfaces. | ||
- neumann: Flux or gradient boundary condition for specified surfaces. | ||
--> | ||
<fem> | ||
<qdot>6.3e-2</qdot> | ||
<mesh-type>TETRA4</mesh-type> | ||
<boundary-conditions> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>leftSurfaceCircularPipe</surface> | ||
<value>55.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>rightSurfaceCircularPipe</surface> | ||
<value>12.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>leftSurfaceSquarePipe</surface> | ||
<value>55.0</value> | ||
</dirichlet> | ||
<dirichlet> | ||
<enforce-Dirichlet-method>Penalty</enforce-Dirichlet-method> | ||
<surface>rightSurfaceSquarePipe</surface> | ||
<value>12.0</value> | ||
</dirichlet> | ||
</boundary-conditions> | ||
<material-property> | ||
<volume>SquarePipeVol</volume> | ||
<lambda>16.5</lambda> | ||
</material-property> | ||
<material-property> | ||
<volume>CylindricalPipeVol</volume> | ||
<lambda>35.8</lambda> | ||
</material-property> | ||
</fem> | ||
|
||
<!-- | ||
Post-processing settings: | ||
- output-period: Defines how often (in simulation steps) the output is generated. | ||
- format: Specifies the post-processing format, here using VtkHdfV2. | ||
- output: Defines the variables to be included in the post-processing output. | ||
--> | ||
<arcane-post-processing> | ||
<output-period>1</output-period> | ||
<output> | ||
<variable>U</variable> | ||
</output> | ||
</arcane-post-processing> | ||
|
||
</case> |