Skip to content

Commit d45fc0f

Browse files
authored
Merge pull request #61 from MultiSimOLab/dissipation
2 parents 706408d + 968994c commit d45fc0f

File tree

2 files changed

+10
-25
lines changed

2 files changed

+10
-25
lines changed

src/PhysicalModels/ThermoElectroMechanicalModels.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,13 @@ struct ThermoElectroMech_Bonet{T<:Thermo,E<:Electro,M<:Mechano} <: ThermoElectro
153153
return (Ψ, ∂Ψ_∂F, ∂Ψ_∂E, ∂Ψ_∂δθ, ∂2Ψ_∂2F, ∂2Ψ_∂2E, ∂2Ψ_∂2δθ, ∂ΨEF, ∂ΨFδθ, ∂ΨEδθ, η)
154154
end
155155
end
156+
157+
function Dissipation(obj::ThermoElectroMech_Bonet, Δt)
158+
@unpack Cv,θr, α, κ, γv, γd = obj.thermo
159+
Dvis = Dissipation(obj.mechano, Δt)
160+
gd(δθ) = 1/(γd+1) * (((δθ+θr)/θr)^(γd+1) -1)
161+
∂gd(δθ) = (δθ+θr)^γd / θr^(γd+1)
162+
D(F, E, δθ, A...) = (1 + gd(δθ)) * Dvis(F, A...)
163+
∂D∂θ(F, E, δθ, A...) = ∂gd(δθ) * Dvis(F, A...)
164+
return(D, ∂D∂θ)
165+
end

src/PhysicalModels/ViscousModels.jl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -497,28 +497,3 @@ function ViscousDissipation(obj::ViscousIncompressible, Δt::Float64,
497497
Dvis = -Se (invCCe ∂Se)
498498
Dvis
499499
end
500-
501-
502-
function DissipationDerivative(obj::ViscousIncompressible, Δt::Float64,
503-
Se_::Function, ∂Se∂Ce_::Function,
504-
F::TensorValue, Fn::TensorValue, A::VectorValue)
505-
Uvn = TensorValue{3,3}(A[1:9]...)
506-
λαn = A[10]
507-
#------------------------------------------
508-
# Get kinematics
509-
#------------------------------------------
510-
invUvn = inv(Uvn)
511-
C = Cauchy(F)
512-
Cn = Cauchy(Fn)
513-
Ceᵗʳ = ElasticCauchy(C, invUvn)
514-
Cen = ElasticCauchy(Cn, invUvn)
515-
#------------------------------------------
516-
# Return mapping algorithm
517-
#------------------------------------------
518-
Ce, λα = return_mapping_algorithm!(obj, Δt, Se_, ∂Se∂Ce_, C, Ceᵗʳ, Cen, λαn)
519-
#------------------------------------------
520-
# Dissipation derivative
521-
#------------------------------------------
522-
"""Derivative with respect to the temperature."""
523-
return 0.0
524-
end

0 commit comments

Comments
 (0)