diff --git a/src/Mechanical/TranslationalPosition/components.jl b/src/Mechanical/TranslationalPosition/components.jl index 84c76206d..8d8896458 100644 --- a/src/Mechanical/TranslationalPosition/components.jl +++ b/src/Mechanical/TranslationalPosition/components.jl @@ -133,7 +133,7 @@ end #default function end @named flange_a = Flange(; s = flange_a__s, f = k * (flange_a__s - flange_b__s - l)) - @named flange_b = Flange(; s = flange_a__s, f = -k * (flange_a__s - flange_b__s - l)) + @named flange_b = Flange(; s = flange_b__s, f = -k * (flange_a__s - flange_b__s - l)) eqs = [ # delta_s ~ flange_a.s - flange_b.s diff --git a/src/Mechanical/TranslationalPosition/sensors.jl b/src/Mechanical/TranslationalPosition/sensors.jl index cdaf8bcbe..8e264dbb1 100644 --- a/src/Mechanical/TranslationalPosition/sensors.jl +++ b/src/Mechanical/TranslationalPosition/sensors.jl @@ -70,7 +70,7 @@ Linear 1D acceleration sensor. end @variables begin - a(t) = 0.0 + a(t) end @equations begin diff --git a/src/Thermal/HeatTransfer/ideal_components.jl b/src/Thermal/HeatTransfer/ideal_components.jl index fc6858bbf..70dfe446c 100644 --- a/src/Thermal/HeatTransfer/ideal_components.jl +++ b/src/Thermal/HeatTransfer/ideal_components.jl @@ -24,8 +24,8 @@ Lumped thermal element storing heat C, [description = "Heat capacity of element"] end @variables begin - T(t) = 273.15 + 20 - der_T(t) + T(t), [guess = 273.15 + 20] + der_T(t), [guess = 0.0] end @equations begin diff --git a/src/Thermal/utils.jl b/src/Thermal/utils.jl index e2a991494..8408acf2f 100644 --- a/src/Thermal/utils.jl +++ b/src/Thermal/utils.jl @@ -1,6 +1,6 @@ @connector HeatPort begin - T(t) = 273.15 + 20.0 - Q_flow(t), [connect = Flow] + T(t), [guess = 273.15 + 20.0] + Q_flow(t), [guess = 0.0, connect = Flow] end Base.@doc """ HeatPort(; name, T = 273.15 + 20.0, Q_flow = 0.0) @@ -35,8 +35,8 @@ flow rate through the element from `port_a` to `port_b`, `Q_flow`. port_b = HeatPort() end @variables begin - dT(t) - Q_flow(t) + dT(t), [guess = 0.0] + Q_flow(t), [guess = 0.0] end @equations begin dT ~ port_a.T - port_b.T @@ -69,8 +69,8 @@ flow rate through the element from `solid` to `fluid`, `Q_flow`. fluid = HeatPort() end @variables begin - dT(t) - Q_flow(t) + dT(t), [guess = 0.0] + Q_flow(t), [guess = 0.0] end @equations begin dT ~ solid.T - fluid.T