diff --git a/src/Density/Density.jl b/src/Density/Density.jl index 8cfc3c0fa..13f20335a 100644 --- a/src/Density/Density.jl +++ b/src/Density/Density.jl @@ -35,8 +35,11 @@ end # Calculation routine function ComputeDensity(P,T, s::ConstantDensity) @unpack ρ = s - - return ρ*1.0 + if length(T)>1 + return Value(ρ).*ones(size(T)) + else + return ρ*1.0 + end end # Print info diff --git a/src/Energy/Conductivity.jl b/src/Energy/Conductivity.jl index b076ecede..46578f816 100644 --- a/src/Energy/Conductivity.jl +++ b/src/Energy/Conductivity.jl @@ -38,7 +38,7 @@ function ComputeConductivity(P, T, s::ConstantConductivity) @unpack k = s if length(T)>1 - return k.*ones(size(T)) + return Value(k).*ones(size(T)) else return Value(k) end diff --git a/src/Energy/HeatCapacity.jl b/src/Energy/HeatCapacity.jl index a32b2f067..39d892a5f 100644 --- a/src/Energy/HeatCapacity.jl +++ b/src/Energy/HeatCapacity.jl @@ -35,7 +35,7 @@ end function ComputeHeatCapacity(P, T, s::ConstantHeatCapacity) @unpack cp = s if length(T)>1 - return cp*ones(size(T)) + return Value(cp)*ones(size(T)) else return Value(cp) end