diff --git a/src/Electrical/Analog/transistors.jl b/src/Electrical/Analog/transistors.jl index 0af2bd13..129e8f3a 100644 --- a/src/Electrical/Analog/transistors.jl +++ b/src/Electrical/Analog/transistors.jl @@ -164,7 +164,6 @@ Early voltage effect. end end - """ PNP(;name, B_F, B_R, Is, V_T, V_A, phi_C, phi_E, Z_C, Z_E, Tau_f, Tau_r, C_jC0, C_jE0, C_CS, gamma_C, gamma_E, NF, NR) @@ -329,4 +328,4 @@ Early voltage effect. b.i ~ -IEC / B_R - ICC / B_F - (C_jC + C_DC) * D(V_CB) - (C_jE + C_DE) * D(V_EB) e.i ~ -c.i - b.i - I_sub end -end \ No newline at end of file +end diff --git a/src/Hydraulic/IsothermalCompressible/components.jl b/src/Hydraulic/IsothermalCompressible/components.jl index 5815f9c9..2921cc28 100644 --- a/src/Hydraulic/IsothermalCompressible/components.jl +++ b/src/Hydraulic/IsothermalCompressible/components.jl @@ -354,7 +354,7 @@ end vol(t) end - # let + # let dm = port.dm p = port.p @@ -454,7 +454,6 @@ See also [`FixedVolume`](@ref), [`DynamicVolume`](@ref) direction = +1, x_int, name) - pars = @parameters begin area = area x_int = x_int @@ -489,11 +488,11 @@ See also [`FixedVolume`](@ref), [`DynamicVolume`](@ref) end eqs = [ - # connectors - port.p ~ p - port.dm ~ dm - flange.v * direction ~ dx - flange.f * direction ~ -f + # connectors + port.p ~ p + port.dm ~ dm + flange.v * direction ~ dx + flange.f * direction ~ -f # differentials D(x) ~ dx D(m) ~ dm diff --git a/test/Electrical/analog.jl b/test/Electrical/analog.jl index b3f96515..1fcc02e4 100644 --- a/test/Electrical/analog.jl +++ b/test/Electrical/analog.jl @@ -541,9 +541,7 @@ end # savefig(plt, "rc_circuit_test_variable_resistor") end - @testset "NPN Tests" begin - @mtkmodel SimpleNPNCircuit begin @components begin Q1 = NPN() @@ -624,10 +622,8 @@ end sol[sys.Q1.c.i][15] + sol[sys.Q1.s.i][15], 0.0, atol = 1e-16) - end - @testset "PNP Tests" begin @mtkmodel SimplePNPCircuit begin @components begin @@ -710,4 +706,4 @@ end sol[sys.Q1.s.i][15], 0.0, atol = 1e-16) -end \ No newline at end of file +end diff --git a/test/Thermal/piston.jl b/test/Thermal/piston.jl index 9b915f71..03e42ff6 100644 --- a/test/Thermal/piston.jl +++ b/test/Thermal/piston.jl @@ -41,8 +41,6 @@ using ModelingToolkitStandardLibrary.Blocks @test SciMLBase.successful_retcode(sol) # The initial value doesn't add up to absolute zero, while the rest do. To avoid # tolerance on the latter, the test is split in two parts. - @test sol[piston.gas.Q_flow][1] + sol[piston.coolant.Q_flow][1]≈0 atol=1e-6 - @test sol[piston.gas.Q_flow][2:end] + - sol[piston.coolant.Q_flow][2:end]≈ - zeros(length(sol) - 1) atol=1e-6 + @test sol[piston.gas.Q_flow][1]≈-sol[piston.coolant.Q_flow][1] rtol=1e-6 + @test sol[piston.gas.Q_flow][2:end]≈-sol[piston.coolant.Q_flow][2:end] rtol=1e-6 end