Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mechanical/TranslationalPosition/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Mechanical/TranslationalPosition/sensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Linear 1D acceleration sensor.
end

@variables begin
a(t) = 0.0
a(t)
end

@equations begin
Expand Down
4 changes: 2 additions & 2 deletions src/Thermal/HeatTransfer/ideal_components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/Thermal/utils.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading