For a project I want to have a single domain where I switch between which constitutive model is used. Conceptually this is something like:
if A:
C = C_A
elif B:
C = C_B
else:
C = gamma*C_A + (1-gamma) * C_B
where C
represents the constitutive model (e.g. C_A
= hyperelasticity). condition
and gamma
are defined over the field and change each iteration. I am currently thinking that it might be best to represent this hybrid constitutive model as a single constitutive model, where I pass the conditions and gamma
as additional parameters to each gauss point. Alternatively, I could perhaps create separate functions for each constitutive model, and then ‘post-process’ combine both.
What is a good way to implement this in dolfinx?