diff --git a/examples/antora.yml b/examples/antora.yml index cc051072..6ff0fda2 100644 --- a/examples/antora.yml +++ b/examples/antora.yml @@ -1,6 +1,6 @@ name: cases title: Feel++ Toolbox Cases Guide -version: '0.106' +version: '0.106-case-pendulum2D-csm' nav: - modules/ROOT/nav.adoc - modules/csm/nav.adoc diff --git a/examples/modules/csm/assets/images/pendulum/2Dimage1.png b/examples/modules/csm/assets/images/pendulum/2Dimage1.png new file mode 100644 index 00000000..6ff8d2ce Binary files /dev/null and b/examples/modules/csm/assets/images/pendulum/2Dimage1.png differ diff --git a/examples/modules/csm/assets/images/pendulum/mesh2D.png b/examples/modules/csm/assets/images/pendulum/mesh2D.png new file mode 100644 index 00000000..147be595 Binary files /dev/null and b/examples/modules/csm/assets/images/pendulum/mesh2D.png differ diff --git a/examples/modules/csm/assets/images/pendulum/mesh3D.png b/examples/modules/csm/assets/images/pendulum/mesh3D.png new file mode 100644 index 00000000..def60f3e Binary files /dev/null and b/examples/modules/csm/assets/images/pendulum/mesh3D.png differ diff --git a/examples/modules/csm/examples/pendulum2D/pendulum2D.cfg b/examples/modules/csm/examples/pendulum2D/pendulum2D.cfg new file mode 100644 index 00000000..0ae3d9aa --- /dev/null +++ b/examples/modules/csm/examples/pendulum2D/pendulum2D.cfg @@ -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 \ No newline at end of file diff --git a/examples/modules/csm/examples/pendulum2D/pendulum2D.geo b/examples/modules/csm/examples/pendulum2D/pendulum2D.geo new file mode 100644 index 00000000..9c77d7f6 --- /dev/null +++ b/examples/modules/csm/examples/pendulum2D/pendulum2D.geo @@ -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}; diff --git a/examples/modules/csm/examples/pendulum2D/pendulum2D.json b/examples/modules/csm/examples/pendulum2D/pendulum2D.json new file mode 100644 index 00000000..546137d5 --- /dev/null +++ b/examples/modules/csm/examples/pendulum2D/pendulum2D.json @@ -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":"" + } + } + +} diff --git a/examples/modules/csm/examples/pendulum3D/pendulum3D.cfg b/examples/modules/csm/examples/pendulum3D/pendulum3D.cfg new file mode 100644 index 00000000..9a8bdd68 --- /dev/null +++ b/examples/modules/csm/examples/pendulum3D/pendulum3D.cfg @@ -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 \ No newline at end of file diff --git a/examples/modules/csm/examples/pendulum3D/pendulum3D.geo b/examples/modules/csm/examples/pendulum3D/pendulum3D.geo new file mode 100644 index 00000000..a97a97b7 --- /dev/null +++ b/examples/modules/csm/examples/pendulum3D/pendulum3D.geo @@ -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}; + diff --git a/examples/modules/csm/examples/pendulum3D/pendulum3D.json b/examples/modules/csm/examples/pendulum3D/pendulum3D.json new file mode 100644 index 00000000..426a6a73 --- /dev/null +++ b/examples/modules/csm/examples/pendulum3D/pendulum3D.json @@ -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":"" + } + } + +} diff --git a/examples/modules/csm/nav.adoc b/examples/modules/csm/nav.adoc index 1146e8c9..bf347b56 100644 --- a/examples/modules/csm/nav.adoc +++ b/examples/modules/csm/nav.adoc @@ -16,3 +16,5 @@ *** xref:sheet-rounding/index.adoc[Effect of sheet rounding] *** xref:t-beam/index.adoc[T-Beam] *** xref:vierendeel-truss/index.adoc[Vierendeel Truss] +*** xref:pendulum2D/index.adoc[Pendulum 2D] +*** xref:pendulum3D/index.adoc[Pendulum 3D] diff --git a/examples/modules/csm/pages/README.adoc b/examples/modules/csm/pages/README.adoc index 867e802e..b73a7f14 100644 --- a/examples/modules/csm/pages/README.adoc +++ b/examples/modules/csm/pages/README.adoc @@ -89,3 +89,11 @@ |=== | image:vierendeel-truss/image1.png[Vierendeel Truss,100%] | A Vierendeel truss is a lightweight deep beam or girder structural concept. The goal of this exercise is to determine the deformation and stress state of the aluminium Vierendeel truss shown below, in particular the maximum stress around the lightening holes. |=== + + +=== xref:pendulum2D/index.adoc[Pendulum 2D] + +[cols="1,3"] +|=== +| image:pendulum/2Dimage1.png[Pendulum 2D,100%] | 2D Pendulum oscillating, using Hyper-Elasticity equation. +|=== diff --git a/examples/modules/csm/pages/pendulum2D/index.adoc b/examples/modules/csm/pages/pendulum2D/index.adoc new file mode 100644 index 00000000..e00ff7bc --- /dev/null +++ b/examples/modules/csm/pages/pendulum2D/index.adoc @@ -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} +---- + +++++ + + +++++ + +== 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. + +++++ +
+
Torsion of a NeoHookean beam
+
+
+ +
+
+
+++++ +=== Fields + +add scalar vectorial and matricial fields to be visualized