Skip to content

Commit

Permalink
146 solid pendulum study (#148)
Browse files Browse the repository at this point in the history
* update pendulum #146

* add report from solid toolbox #136

* add imagesprefix support for #146 as described in #144
  • Loading branch information
jobinhio authored Nov 7, 2022
1 parent ff9dd79 commit ad06ccb
Show file tree
Hide file tree
Showing 6 changed files with 683 additions and 45 deletions.
4 changes: 2 additions & 2 deletions examples/modules/csm/examples/pendulum2D/pendulum2D.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ case.dimension=2
case.discretization=P2 #P1,P2

[solid]
filename=$cfgdir/pendulum2D.json
json.filename=$cfgdir/pendulum2D.json

mesh.filename=$cfgdir/pendulum2D.geo
# mesh.filename=$cfgdir/pendulum2D.geo

# # precondtioner config
pc-type=gamg #lu,gasm,ml
Expand Down
57 changes: 38 additions & 19 deletions examples/modules/csm/examples/pendulum2D/pendulum2D.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,35 @@
{
"Name": "Pendulum Solid Mechanics ",
"ShortName":"Solid",
"Metadata":
{
"version": "1",
"author": ["vincentchabannes","prudhomm","lberti","jobinhio"],
"date": "23/09/2022",
"references":[""]
},
"Models":
{
"equations":"Hyper-Elasticity",
"material-model":"StVenantKirchhoff"
"solid":
{
"setup":
{
"equations":"Hyper-Elasticity",
"material-model":"StVenantKirchhoff",
"body-forces":"{0,-gravity*8920}:gravity"
}
}
},
"Meshes":
{
"solid":
{
"Import":
{
"filename":"$cfgdir/pendulum2D.geo"
}
}
},
// tag::parameters[]
"Parameters":
{
Expand All @@ -28,22 +52,14 @@
// tag::boundaryconditions[]
"BoundaryConditions":
{
"displacement":
"solid":
{
"Dirichlet":
"displacement":
{
"AxeFixed": // vertex angle -> fixed (no displacement)
{
"expr":"{0,0}"
}
},

"VolumicForces":
{
"Solid":
{
"expr":"{0,-gravity*8920}:gravity"
}
}
}

Expand All @@ -52,14 +68,17 @@
// tag::exports[]
"PostProcess":
{
"Exports":
"solid":
{
"fields":["displacement","pid","von-mises-criterion"]
},
"Measures":
{
"VolumeVariation":""
"Exports":
{
"fields":["displacement","pid","von-mises-criterion"]
},
"Measures":
{
"VolumeVariation":""
}
}
}
}
// end::exports[]
}
4 changes: 2 additions & 2 deletions examples/modules/csm/examples/pendulum3D/pendulum3D.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ case.dimension=3
case.discretization=P2 #P1,P2

[solid]
filename=$cfgdir/pendulum3D.json
json.filename=$cfgdir/pendulum3D.json

mesh.filename=$cfgdir/pendulum3D.geo
# mesh.filename=$cfgdir/pendulum3D.geo


# # precondtioner config
Expand Down
58 changes: 38 additions & 20 deletions examples/modules/csm/examples/pendulum3D/pendulum3D.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
{
"Name": "Pendulum Solid Mechanics ",
"ShortName":"Solid",
"Metadata":
{
"version": "1",
"author": ["vincentchabannes","prudhomm","lberti","jobinhio"],
"date": "23/09/2022",
"references":[""]
},
"Models":
{
"equations":"Hyper-Elasticity",
"material-model":"StVenantKirchhoff"
"solid":
{
"setup":
{
"equations":"Hyper-Elasticity",
"material-model":"StVenantKirchhoff",
"body-forces":"{0,-gravity*8920,0}:gravity"
}
}
},
"Meshes":
{
"solid":
{
"Import":
{
"filename":"$cfgdir/pendulum3D.geo"
}
}
},
// tag::parameters[]
"Parameters":
Expand All @@ -26,36 +50,30 @@
// tag::boundaryconditions[]
"BoundaryConditions":
{
"displacement":
"solid":
{
"Dirichlet":
"displacement":
{
"AxeFixed":
{
"expr":"{0,0,0}"
}
},

"VolumicForces":
{
"Solid":
{
"expr":"{0,-gravity*8920,0}:gravity"
}
}
}

}
},
// end::boundaryconditions[]
"PostProcess":
{
"Exports":
{
"fields":["displacement","pid","von-mises-criterion"]
},
"Measures":
"solid":
{
"VolumeVariation":""
"Exports":
{
"fields":["displacement","pid","von-mises-criterion"]
},
"Measures":
{
"VolumeVariation":""
}
}
}

Expand Down
7 changes: 5 additions & 2 deletions examples/modules/csm/pages/pendulum2D/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
: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

:imagesprefix:
ifdef::env-github,env-browser,env-vscode[:imagesprefix: ../../assets/images/]
== Description

In this example, we simulate the oscillating motion of a highly flexible 2D pendulum.
Expand All @@ -27,6 +28,8 @@ Copy case 2D option to clipboard
</button>
++++

NOTE: The report of the execution of the command above is available xref:pendulum2D/solid-informations.adoc[here].

== Data files

The case data files are available in Github link:{uri-data}/pendulum/[here]
Expand All @@ -40,7 +43,7 @@ The case data files are available in Github link:{uri-data}/pendulum/[here]
The pendulum is an isosceles triangle-shaped mesh as shown below.

.Pendulum mesh
image:pendulum/mesh2D.png[50%]
image:{imagesprefix}pendulum/mesh2D.png[50%]



Expand Down
Loading

0 comments on commit ad06ccb

Please sign in to comment.