@@ -97,6 +97,31 @@ function Cauchy(physmodel::ThermoElectroMechano, uh, φh, θh, Ω, dΩ, Λ=1.0)
9797end
9898
9999
100+ function Cauchy (model:: ViscoElastic , uh, unh, state_vars, Ω, dΩ, t, Δt)
101+ _, ∂Ψu, _ = model (Δt= Δt)
102+ F, _, _ = get_Kinematics (model. Kinematic)
103+ σ = ∂Ψu ∘ (F∘ ∇ (uh), F∘ ∇ (unh), state_vars... )
104+ return interpolate_σ_everywhere (σ, Ω, dΩ)
105+ end
106+
107+
108+ function interpolate_σ_everywhere (σ, Ω, dΩ)
109+ ref_L2 = ReferenceFE (lagrangian, Float64, 0 )
110+ ref_fe = ReferenceFE (lagrangian, Float64, 1 )
111+ VL2 = FESpace (Ω, ref_L2, conformity= :L2 )
112+ V = FESpace (Ω, ref_fe, conformity= :H1 )
113+ n1 = VectorValue (1.0 , 0.0 , 0.0 )
114+ n2 = VectorValue (0.0 , 1.0 , 0.0 )
115+ n3 = VectorValue (0.0 , 0.0 , 1.0 )
116+ σ11h = interpolate_everywhere (L2_Projection (n1 ⋅ σ ⋅ n1, dΩ, VL2), V)
117+ σ12h = interpolate_everywhere (L2_Projection (n1 ⋅ σ ⋅ n2, dΩ, VL2), V)
118+ σ13h = interpolate_everywhere (L2_Projection (n1 ⋅ σ ⋅ n3, dΩ, VL2), V)
119+ σ22h = interpolate_everywhere (L2_Projection (n2 ⋅ σ ⋅ n2, dΩ, VL2), V)
120+ σ23h = interpolate_everywhere (L2_Projection (n2 ⋅ σ ⋅ n3, dΩ, VL2), V)
121+ σ33h = interpolate_everywhere (L2_Projection (n3 ⋅ σ ⋅ n3, dΩ, VL2), V)
122+ ph = interpolate_everywhere (L2_Projection (tr ∘ σ, dΩ, VL2), V)
123+ return (σ11h, σ12h, σ13h, σ22h, σ23h, σ33h, ph)
124+ end
100125
101126
102127function Entropy (physmodel:: ThermoElectroMechano , uh, φh, θh, Ω, dΩ, Λ= 1.0 )
0 commit comments