How to perform a post-process calculation in different sub-domains?

11 weeks ago by

I have three sub-domains that have different material properties. I calculate displacement vector from Biot equation, then I want to calculate stress according to the aforementioned displacement as follows:
def sigma(u,mu_l,lmbda_l):
    return 2*mu_l*sym(grad(u)) + lmbda_l*div(u)*I​

mu_l and lmbda_l are different for all three sub-domains. Do you have any recommendations how to perform this calculation and then export the result to XDMFFile?

Thank you very much!


Community: FEniCS Project
How are your material parameters defined? Can you add the corresponding piece of code?

If your material parameters are dolfin functions (for example cellwise constants) with the proper values assigned to account for the spatial dependencies you can just project your sigma expression onto an appropriate tensor function space and export the resulting projection.
written 11 weeks ago by klunkean  
Thank you very much for your help!

The material properties are defined as a constant in each domain as follows:
#define mechanics parameters
def E_nu_to_mu_lmbda(E, nu):
    mu = E/(2*(1.0+nu))
    lmbda = (nu*E)/((1-2*nu)*(1+nu))
    return (mu, lmbda)

E1 = 14.e9 # Pa
nu1 = 0.35
E2 = 14.e9 # Pa
nu2 = 0.35
E3 = 14.e9 # Pa
nu3 = 0.35
(mu_l1, lmbda_l1) = E_nu_to_mu_lmbda(E1, nu1)
(mu_l2, lmbda_l2) = E_nu_to_mu_lmbda(E2, nu2)
(mu_l3, lmbda_l3) = E_nu_to_mu_lmbda(E3, nu3)​
written 11 weeks ago by Teeratorn Kadeethum  
If I have one domain I will do as follows:
S = TensorFunctionSpace(mesh, "CG", 1)

s = project(sigma(u,mu_l,lmbda_l),S)​

However, I do not how to perform this calculation for multiple sub-domains.



written 11 weeks ago by Teeratorn Kadeethum  
Ah so you haven't implemented the parameters for different subdomains then.

Maybe check out this thread and the source linked in my reply.
written 11 weeks ago by klunkean  
I see! Thank you very much.
written 11 weeks ago by Teeratorn Kadeethum  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »