-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started working on the 2D pendulum CSM case (issue #6)
Merge branch 'case-6-pendulum-csm' of github.com:feelpp/toolbox into case-pendulum2D-csm
- Loading branch information
Showing
13 changed files
with
323 additions
and
1 deletion.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,28 @@ | ||
|
||
directory=toolboxes/solid/pendulum/ | ||
case.dimension=2 | ||
case.discretization=P2 #P1,P2 | ||
|
||
[solid] | ||
filename=$cfgdir/pendulum2D.json | ||
|
||
mesh.filename=$cfgdir/pendulum2D.geo | ||
|
||
material_law=StVenantKirchhoff# StVenantKirchhoff, NeoHookean | ||
|
||
|
||
# # precondtioner config | ||
pc-type=gamg #lu,gasm,ml | ||
ksp-monitor=1 | ||
# ksp-converged-reason=1 | ||
|
||
|
||
|
||
[ts] | ||
time-step=0.01 | ||
time-final=10 | ||
#restart=true | ||
restart.at-last-save=true | ||
#time-initial=0.0002 | ||
#save.freq=2 | ||
file-format=hdf5 |
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,16 @@ | ||
h=0.1; | ||
Point(1) = { 0,0,0,h}; | ||
Point(2) = {-0.5,-3,0,h}; | ||
Point(3) = { 0.5,-3,0,h}; | ||
Line(1) = {1, 2}; | ||
Line(2) = {2, 3}; | ||
Line(3) = {3, 1}; | ||
Line Loop(4) = {1, 2, 3}; | ||
Plane Surface(5) = {4}; | ||
Rotate {{0, 0, 1}, {0, 0, 0}, Pi/4} { | ||
Surface{5}; | ||
} | ||
|
||
Physical Point("AxeFixed") = {1}; | ||
Physical Line("SolidBoundary") = {1,2,3}; | ||
Physical Surface("Solid") = {5}; |
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 @@ | ||
{ | ||
"Name": "Pendulum Solid Mechanics ", | ||
"ShortName":"Solid", | ||
"Models": | ||
{ | ||
"equations":"Hyper-Elasticity" | ||
}, | ||
// tag::parameters[] | ||
"Parameters": | ||
{ | ||
"gravity":"9.80665" | ||
}, | ||
//end::parameters[] | ||
// tag::materials[] | ||
"Materials": | ||
{ | ||
"Solid": | ||
{ | ||
"E":"128e6", // N/mm^2 | ||
"nu":"0.33", // | ||
"rho":"8920" // kg/mm^3 | ||
} | ||
}, | ||
// end::materials[] | ||
// tag::boundaryconditions[] | ||
"BoundaryConditions": | ||
{ | ||
"displacement": | ||
{ | ||
"Dirichlet": | ||
{ | ||
"AxeFixed": | ||
{ | ||
"expr":"{0,0}" | ||
} | ||
}, | ||
|
||
"VolumicForces": | ||
{ | ||
"": | ||
{ | ||
"expr":"{0,-gravity*8920}:gravity" | ||
} | ||
} | ||
} | ||
|
||
}, | ||
// end::boundaryconditions[] | ||
"PostProcess": | ||
{ | ||
"Exports": | ||
{ | ||
"fields":["displacement","pid","Von-Mises"] | ||
}, | ||
"Measures": | ||
{ | ||
"VolumeVariation":"" | ||
} | ||
} | ||
|
||
} |
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,28 @@ | ||
|
||
directory=toolboxes/solid/pendulum/ | ||
case.dimension=3 | ||
case.discretization=P2 #P1,P2 | ||
|
||
[solid] | ||
filename=$cfgdir/pendulum3D.json | ||
|
||
mesh.filename=$cfgdir/pendulum3D.geo | ||
|
||
material_law=StVenantKirchhoff# StVenantKirchhoff, NeoHookean | ||
|
||
|
||
# # precondtioner config | ||
pc-type=gamg #lu,gasm,ml | ||
ksp-monitor=1 | ||
# ksp-converged-reason=1 | ||
|
||
|
||
|
||
[ts] | ||
time-step=0.01 | ||
time-final=10 | ||
#restart=true | ||
restart.at-last-save=true | ||
#time-initial=0.0002 | ||
#save.freq=2 | ||
file-format=hdf5 |
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,22 @@ | ||
h=0.1; | ||
Point(1) = { 0,0,0,h}; | ||
Point(2) = {-0.5,-3,0,h}; | ||
Point(3) = { 0.5,-3,0,h}; | ||
Line(1) = {1, 2}; | ||
Line(2) = {2, 3}; | ||
Line(3) = {3, 1}; | ||
Line Loop(4) = {1, 2, 3}; | ||
Plane Surface(5) = {4}; | ||
Rotate {{0, 0, 1}, {0, 0, 0}, Pi/4} { | ||
Surface{5}; | ||
} | ||
Extrude {0, 0, 1} { | ||
Surface{5}; | ||
} | ||
/*Surface Loop(23) = {22, 13, 5, 17, 21}; | ||
Volume(24) = {23}; | ||
*/ | ||
Physical Line("AxeFixed") = {11}; | ||
Physical Surface("SolidBoundary") = {21, 5, 13, 22, 17}; | ||
Physical Volume("Solid") = {1}; | ||
|
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 @@ | ||
{ | ||
"Name": "Pendulum Solid Mechanics ", | ||
"ShortName":"Solid", | ||
"Models": | ||
{ | ||
"equations":"Hyper-Elasticity" | ||
}, | ||
// tag::parameters[] | ||
"Parameters": | ||
{ | ||
"gravity":"9.80665" | ||
}, | ||
//end::parameters[] | ||
// tag::materials[] | ||
"Materials": | ||
{ | ||
"Solid": | ||
{ | ||
"E":"128e6", // N/mm^2 | ||
"nu":"0.33", // | ||
"rho":"8920" // kg/mm^3 | ||
} | ||
}, | ||
// end::materials[] | ||
// tag::boundaryconditions[] | ||
"BoundaryConditions": | ||
{ | ||
"displacement": | ||
{ | ||
"Dirichlet": | ||
{ | ||
"AxeFixed": | ||
{ | ||
"expr":"{0,0,0}" | ||
} | ||
}, | ||
|
||
"VolumicForces": | ||
{ | ||
"": | ||
{ | ||
"expr":"{0,0,-gravity*8920}:gravity" | ||
} | ||
} | ||
} | ||
|
||
}, | ||
// end::boundaryconditions[] | ||
"PostProcess": | ||
{ | ||
"Exports": | ||
{ | ||
"fields":["displacement","pid","Von-Mises"] | ||
}, | ||
"Measures": | ||
{ | ||
"VolumeVariation":"" | ||
} | ||
} | ||
|
||
} |
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
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,96 @@ | ||
= 2D Pendulum | ||
:toc: left | ||
:uri-data: https://github.com/feelpp/toolbox/blob/master/examples/modules/csm/examples | ||
:uri-data-edit: https://github.com/feelpp/toolbox/edit/master/examples/modules/csm/examples | ||
_describe context of the example and the example itself, use refs below if available_ | ||
|
||
|
||
== Running the case | ||
|
||
The command line to run this case is | ||
|
||
|
||
[[command-line2D]] | ||
[source,sh] | ||
---- | ||
mpirun -np 4 feelpp_toolbox_solid --case "github:{repo:toolbox,path:examples/modules/csm/examples/pendulum/pendulum2D} | ||
---- | ||
|
||
++++ | ||
<button class="btn" data-clipboard-target="#command-line2D"> | ||
Copy 3D command line to clipboard | ||
</button> | ||
<button class="btn" data-clipboard-text="github:{repo:toolbox,path:examples/modules/csm/examples/pendulum/pendulum2D}"> | ||
Copy case 2D option to clipboard | ||
</button> | ||
++++ | ||
|
||
== Data files | ||
|
||
The case data files are available in Github link:{uri-data}/pendulum/[here] | ||
|
||
|
||
* link:{uri-data}/pendulum/pendulum2D/pendulum2D.cfg[CFG file] - [link:{uri-data-edit}/pendulum/pendulum2D/pendulum2D.cfg[Edit the file]] | ||
* link:{uri-data}/pendulum/pendulum2D/pendulum2D.json[JSON file] - [link:{uri-data-edit}/pendulum/pendulum2D/pendulum2D.json[Edit the file]] | ||
|
||
== Geometry | ||
|
||
The pendulum is a triangle-shaped mesh. | ||
|
||
image:pendulum/mesh2D.png[50%] | ||
The mesh can be retrieved from girder with the following ID: 5b200dcbb0e9570499f66bfb (see xref:contribute:girder:README.adoc[girder]). | ||
|
||
== Input parameters | ||
|
||
[options="header"] | ||
|=== | ||
| Name |Description | Value | Unit | | ||
|=== | ||
|
||
=== Model & Toolbox | ||
|
||
We use the Hyper-Elasticity model. | ||
The model is described in the CSM toolbox documentation, see xref:toolboxes:csm:index.adoc[Computational Solid Mechanics] | ||
|
||
|
||
=== Materials | ||
|
||
[source,json] | ||
---- | ||
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=params] | ||
---- | ||
|
||
== Boundary conditions | ||
We use ..... | ||
|
||
|
||
[source,json,,indent=0] | ||
---- | ||
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=bc] | ||
---- | ||
|
||
== Outputs | ||
|
||
describe the output set of the example | ||
|
||
[source,json] | ||
---- | ||
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=export] | ||
---- | ||
== Video | ||
|
||
The video below shows the torsion of the beam at different steps. | ||
|
||
++++ | ||
<div class="videoblock"> | ||
<div class="title">Torsion of a NeoHookean beam</div> | ||
<div class="stretchy-wrapper-16_9"> | ||
<div class="content" style="margin: auto; width: 100%; height: 100%"> | ||
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/SUAqM6liXII" frameborder="0" allowfullscreen></iframe> | ||
</div> | ||
</div> | ||
</div> | ||
++++ | ||
=== Fields | ||
|
||
add scalar vectorial and matricial fields to be visualized |