aatmdelissen / pyMOTO

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

Material class #14

Open JoranZwet opened 11 months ago

JoranZwet commented 11 months ago

I propose to use a material class to store material properties instead of independently defining each material property whenever it is necessary.

As a consequence get_D, assemblestiffness and assemblemass would have to be altered, where instead of defining material attributes (e_modulus, nu, rho), we would first define a material class which stores all those values.

Stijn made me do this

aatmdelissen commented 11 months ago

Some questions we need to think about before we can implement this:

artofscience commented 11 months ago

small add; for multiple material with different Poisson ratio we can look at SIMPALL [Ferrer, 2020]; I have some good experience with this.

JoranZwet commented 11 months ago

I think each material property should just have a default value when the material class is initialized, then a user would only have to define specific material properties when they are relevant

artofscience commented 11 months ago

It is probably easiest to make a new branch where you introduce this feature; then we can check the use of such class as well as the implications on other modules. (aka geen woorden maar daden)

aatmdelissen commented 5 days ago

From #21:

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

It might be a good idea to draft a generic interface for 1) mesh and 2) physics information, as these are tightly linked. Currently, all modules are focused on a voxel mesh and won't work, e.g., for an unstructured mesh.

Idea is that DomainDefinition can also generate physics data - domain.Stiffness(E=210, nu=0.3) would generate the required data to assemble the stiffness matrix. In general the data required for matrix assembly is:

There are some variations to keep into account