aatmdelissen / pyMOTO

Modular framework for optimization with semi-automatic derivatives
MIT License
22 stars 3 forks source link

Thermo mechanical #21

Closed JoranZwet closed 1 week ago

JoranZwet commented 1 month ago

Added temperature dependent thermo-mechanical loading, using a base class called NodalOperation that translates between elemental values and nodal values

Also added ElementalAverage that uses ElementOperation as base and determines average values within an element

aatmdelissen commented 1 month ago

Looks like a good addition! We're kinda getting quite a lot of modules where the only difference is the _prepare function, where the element matrix is assembled. I'll have to think a bit on how to handle this.

Maybe we can have some way of overriding with a standard argument for the 'general' assemble operation. What I mean is something like

pym.AssembleGeneral(s_scale, EM=Stiffness(E=210e+9, nu=0.3))
pym.AssembleGeneral(s_Scale, EM=Poisson(2.5))

Where the operator passed to EM basically only is used to generate a single stiffness matrix