Calculations Tests
Channel Tests
With no heat flux, temperatures should flow through the channel without changing. |
|
Channel instance is created, its variables, mass vector are correct |
|
|
ChannelAndContacts instance is created, its variables, mass vector are correct |
If all temperatures are constant, then we should be in stable state |
|
|
If the temperature is rising linearly, dT/dt should be constant if nothing else changes |
|
The channel is subjected to constant wall temperatures. |
|
For an isolated system, inlet temperature determines channel profile. |
|
Inverting current in channel raises no error |
Tests for the Channel class.
- test_channel_w_no_heat_flux_maintains_temperature_profile()[source]
With no heat flux, temperatures should flow through the channel without changing. Special consideration is given to the Courant (CFL) condition.
- Return type:
None
- test_channel_with_zero_flow_constant_h_reaches_wall_temperature()[source]
The channel is subjected to constant wall temperatures. Flow is constantly zero, so the system should gradually adjust to the wall temperature. The heat transfer coefficient is set to a constant value.
- Return type:
None
- test_first_order_upwind_dTdt_is_zero_for_zero_heat_flux()[source]
If all temperatures are constant, then we should be in stable state
- Return type:
None
- test_first_order_upwind_inverts_correctly_on_flow_reversal_no_heat_flux()[source]
For an isolated system, inlet temperature determines channel profile. If the flow is reversed, the profile should move in the other direction.
- Return type:
None
- test_first_order_upwind_is_constant_for_linear_temperature_no_heat_flux()[source]
If the temperature is rising linearly, dT/dt should be constant if nothing else changes
- Return type:
None
- test_no_exceptions_raised_through_external_flow_inversion_on_Channel()[source]
Inverting current in channel raises no error
Heat Diffusion Test
If all temperatures are uniform (with zero power), no heat flux should be generated, and the system should be at steady-state. |
|
For an axially symmetric annulus of radii \(r_1, r_2\), given inner and outer boundary temperatures \(T_{1}, T_{2}\), the radial temperature dependence is[1]: |
|
Temperature distribution calculated analytically matches the numeric result, in a polar system with heat production per volume \(\dot{q}\), radius \(r_{0}\) and fixed outer temperature \(T_{s}\). |
|
For an axially symmetric annulus of radii \(r_1, r_2\), given inner and outer boundary temperatures \(T_{1}, T_{2}\), and heat production of \(\dot{q}\) the radial temperature dependence is: |
|
- test_annulus_given_heat_production_and_wall_temperatures(temps=(45, 75), edges=(1, 3.123))[source]
For an axially symmetric annulus of radii \(r_1, r_2\), given inner and outer boundary temperatures \(T_{1}, T_{2}\), and heat production of \(\dot{q}\) the radial temperature dependence is:
\[T(r) = \frac{\dot{q}}{4k}\left[r_1^2 - r^2 + (r_2^2 - r_1^2)\frac{\ln(r / r_1)}{\ln(r_2 / r_1)}\right] + (T_2 - T_1)\frac{\ln(r / r_1)}{\ln(r_2 / r_1)} + T_1\]
- test_annulus_given_wall_temperatures(temps=(45, 75), edges=(1, 3))[source]
For an axially symmetric annulus of radii \(r_1, r_2\), given inner and outer boundary temperatures \(T_{1}, T_{2}\), the radial temperature dependence is[1]:
\[T(r) = (T_{1} - T_{2})\frac{\ln(r / r_2)}{\ln(r_1 / r_2)} + T_{2}\]References
- test_cylinder_given_heat_production_and_wall_temperature(Twall=45, r0=3)[source]
Temperature distribution calculated analytically matches the numeric result, in a polar system with heat production per volume \(\dot{q}\), radius \(r_{0}\) and fixed outer temperature \(T_{s}\). The analytic solution is[1]:
\[T(r) = T_s + \dot{q} (r_0 ^2 - r^2)/4k\]
Ideal Calculations Tests
One cannot impose both dp and mdot as ideal sources |
|
The pump source type (and value) must be set |
|
|
|
- test_pump_errors_on_impossibly_imposed_dp_and_mdot()[source]
One cannot impose both dp and mdot as ideal sources
Flapper Tests
Kirchhoff Tests
The temperature a Junction defines is just the weighted sum of all incoming temperatures with the corresponding mass current. |
|
|
|
|
Oh, how the turns have tabled…
Point Kinetics Tests
Having only precursors in a critical system with beta=0 should yield an exponentially dependent power (like capacitor charging) |
|
|
|