Shape derivatives¶
Learning targets (advanced)
- Parameterize geometry for shape derivatives
Often it is of major importance to study the dependency of simulation results for a changing geometry (shape). JCMsuite
allows to efficiently compute derivatives of simulation results with respect to geometrical shape parameters. This yields a linear approximation of the output results with respect to shape parameters.
This example shows an ellipse with parameterized semi-major-axis lengths. The layout.jcm
file has the form
Layout2D {
...
Ellipse {
Name = "Core"
RadiusX = 5
RadiusY = 5
}
}
Shape derivative parameters are declared at the beginning of the layout.jcm
file:
DerivativeParameter {
Name = "RX"
TreeEntry = Layout2D/Objects/Core/RadiusX
}
DerivativeParameter {
Name = "RY"
TreeEntry = Layout2D/Objects/Core/RadiusY
}
This declares two named shape derivative parameters (RX
and RY
). The entry TreeEntry
refers to the actual value in the .jcm
input tree. TreeEntry
has the form of a path name. For the RadiusX
this is Layout2D/Objects/Core/RadiusX
, but instead of the section tag Ellipse
you can also the section name if available.
With shape derivative parameter defined, JCMsolve
will also compute the derivatives of the fields and their post process values with respect to the geometrical parameters.
JCMview allows to display the deformed meshes
.jcm
Input File
layout.jcm [ASCII]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
DerivativeParameter { Name = "RX" TreeEntry = Layout2D/Objects/Core/RadiusX } DerivativeParameter { Name = "RY" TreeEntry = Layout2D/Objects/Core/RadiusY } Layout2D { UnitOfLength = 1e-09 MeshOptions { MinimumMeshAngle = 20 MaximumSideLength = 10 } Objects { Parallelogram { DomainId = 1 Priority = -1 Width = 20 Height = 20 } Ellipse { Name = "Core" RadiusX = 5 RadiusY = 5 RefineAll = 2 DomainId = 2 } } }