@@ -1566,34 +1566,28 @@ def test_unsteady_parameters():
1566
1566
1567
1567
_ = td .UnsteadyHeatAnalysis (
1568
1568
initial_temperature = 300 ,
1569
- unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 , output_fr = 2 ),
1569
+ unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 ),
1570
1570
)
1571
1571
1572
1572
# test non-positive initial temperature raises error
1573
1573
with pytest .raises (pd .ValidationError ):
1574
1574
_ = td .UnsteadyHeatAnalysis (
1575
1575
initial_temperature = 0 ,
1576
- unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 , output_fr = 2 ),
1576
+ unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 ),
1577
1577
)
1578
1578
1579
1579
# test negative time step raises error
1580
1580
with pytest .raises (pd .ValidationError ):
1581
1581
_ = td .UnsteadyHeatAnalysis (
1582
1582
initial_temperature = 10 ,
1583
- unsteady_spec = td .UnsteadySpec (time_step = - 0.1 , total_time_steps = 1 , output_fr = 2 ),
1583
+ unsteady_spec = td .UnsteadySpec (time_step = - 0.1 , total_time_steps = 1 ),
1584
1584
)
1585
1585
1586
1586
# test negative total time steps raises error
1587
1587
with pytest .raises (pd .ValidationError ):
1588
1588
_ = td .UnsteadyHeatAnalysis (
1589
1589
initial_temperature = 10 ,
1590
- unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = - 1 , output_fr = 2 ),
1591
- )
1592
- # test negative output frequency raises error
1593
- with pytest .raises (pd .ValidationError ):
1594
- _ = td .UnsteadyHeatAnalysis (
1595
- initial_temperature = 10 ,
1596
- unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 , output_fr = - 2 ),
1590
+ unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = - 1 ),
1597
1591
)
1598
1592
1599
1593
@@ -1602,11 +1596,15 @@ def test_unsteady_heat_analysis(heat_simulation):
1602
1596
1603
1597
unsteady_analysis_spec = td .UnsteadyHeatAnalysis (
1604
1598
initial_temperature = 300 ,
1605
- unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 , output_fr = 2 ),
1599
+ unsteady_spec = td .UnsteadySpec (time_step = 0.1 , total_time_steps = 1 ),
1606
1600
)
1607
1601
1608
1602
temp_mnt = td .TemperatureMonitor (
1609
- center = (0 , 0 , 0 ), size = (td .inf , td .inf , td .inf ), name = "temperature" , unstructured = True
1603
+ center = (0 , 0 , 0 ),
1604
+ size = (td .inf , td .inf , td .inf ),
1605
+ name = "temperature" ,
1606
+ unstructured = True ,
1607
+ interval = 2 ,
1610
1608
)
1611
1609
1612
1610
# this should work since the monitor is unstructured
@@ -1617,3 +1615,7 @@ def test_unsteady_heat_analysis(heat_simulation):
1617
1615
with pytest .raises (pd .ValidationError ):
1618
1616
temp_mnt = temp_mnt .updated_copy (unstructured = False )
1619
1617
_ = unsteady_sim .updated_copy (monitors = [temp_mnt ])
1618
+
1619
+ with pytest .raises (pd .ValidationError ):
1620
+ temp_mnt = temp_mnt .updated_copy (unstructured = True , interval = 0 )
1621
+ _ = unsteady_sim .updated_copy (monitors = [temp_mnt ])
0 commit comments