Skip to content

Fixed error of tests failing #365

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 6 commits into from
Mar 6, 2025
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
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ makedocs(sitename = "ModelingToolkitStandardLibrary.jl",
ModelingToolkitStandardLibrary.Hydraulic,
ModelingToolkitStandardLibrary.Hydraulic.IsothermalCompressible],
clean = true, doctest = false, linkcheck = true,
linkcheck_ignore = ["https://www.mathworks.com/help/simscape/ug/basic-principles-of-modeling-physical-networks.html#bq89sba-6"],
warnonly = [:docs_block, :missing_docs, :cross_references],
format = Documenter.HTML(assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/"),
Expand Down
12 changes: 5 additions & 7 deletions src/Electrical/Analog/ideal_components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,9 @@ R = R_const + pos * R_ref * (1 + alpha * (port.T - T_ref))

@parameters begin
R_ref = 1.0,
[description = "Resistance at temperature T_ref when fully closed (pos=1.0)",
unit = "Ω"]
T_ref = 300.15, [description = "Reference temperature", unit = "K"]
R_const = 1e-3, [description = "Constant resistance between p and n", unit = "Ω"]
[description = "Resistance at temperature T_ref when fully closed (pos=1.0) (Ω)"]
T_ref = 300.15, [description = "Reference temperature (K)"]
R_const = 1e-3, [description = "Constant resistance between p and n (Ω)"]
end

@components begin
Expand All @@ -404,13 +403,12 @@ R = R_const + pos * R_ref * (1 + alpha * (port.T - T_ref))

@variables begin
pos(t), [description = "Position of the wiper (normally 0-1)"]
R(t), [description = "Resistance", unit = "Ω"]
R(t), [description = "Resistance (Ω)"]
end

if T_dep
@parameters begin
alpha = 1e-3,
[description = "Temperature coefficient of resistance", unit = "K^-1"]
alpha = 1e-3, [description = "Temperature coefficient of resistance (K^-1)"]
end
@components begin
port = HeatPort()
Expand Down
Loading