Skip to content

Remove more unnecessary defaults #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
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
4 changes: 2 additions & 2 deletions src/Magnetic/FluxTubes/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Partial component with magnetic potential difference between two magnetic ports
port_n = NegativeMagneticPort()
end
@variables begin
V_m(t) = 0.0
Phi(t) = 0.0
V_m(t)
Phi(t)
end
@equations begin
V_m ~ port_p.V_m - port_n.V_m
Expand Down
2 changes: 1 addition & 1 deletion src/Mechanical/Translational/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use to close a system that has un-connected `MechanicalPort`'s where the force s
flange = MechanicalPort()
end
@variables begin
f(t) = 0.0
f(t)
end
@equations begin
flange.f ~ f
Expand Down
4 changes: 2 additions & 2 deletions src/Mechanical/Translational/utils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@connector MechanicalPort begin
v(t) = 0.0
f(t) = 0.0, [connect = Flow]
v(t)
f(t), [connect = Flow]
end
Base.@doc """
MechanicalPort(;name)
Expand Down
10 changes: 5 additions & 5 deletions src/Mechanical/TranslationalPosition/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Sliding mass with inertia
m
end
@variables begin
s(t) = 0.0
v(t) = 0.0
f(t) = 0.0
s(t)
v(t)
f(t)
end
@components begin
flange = Flange(; s = s)
Expand Down Expand Up @@ -164,8 +164,8 @@ Linear 1D translational damper
d
end
@variables begin
va(t) = 0.0
vb(t) = 0.0
va(t)
vb(t)
f(t) = +(va - vb) * d
end

Expand Down
2 changes: 1 addition & 1 deletion src/Mechanical/TranslationalPosition/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Partial model for a component with two translational 1-dim. flanges and a suppor
@named flange_a = Flange()
@named flange_b = Flange()
sys = [flange_a, flange_b]
@variables s_support(t) = 0.0
@variables s_support(t)
if use_support
@named support = Support()
eqs = [support.s ~ s_support
Expand Down
2 changes: 1 addition & 1 deletion src/Thermal/HeatTransfer/ideal_components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Lumped thermal element storing heat
end
@variables begin
T(t) = 273.15 + 20
der_T(t) = 0.0
der_T(t)
end

@equations begin
Expand Down
8 changes: 4 additions & 4 deletions src/Thermal/utils.jl
Original file line number Diff line number Diff line change
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) = 0.0
Q_flow(t) = 0.0
dT(t)
Q_flow(t)
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) = 0.0
Q_flow(t) = 0.0
dT(t)
Q_flow(t)
end
@equations begin
dT ~ solid.T - fluid.T
Expand Down
Loading