Skip to content

Commit e9b89a8

Browse files
Update test scripts
1 parent 8503454 commit e9b89a8

File tree

6 files changed

+20
-30
lines changed

6 files changed

+20
-30
lines changed

test/TPM_Didymos/TPM_Didymos.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
P₂ = SPICE.convrt(11.93 , "hours", "seconds") # Rotation period of Dimorphos
5555

5656
n_cycle = 2 # Number of cycles to perform TPM
57-
n_step_in_cycle = 72 # Number of time steps in one rotation period
57+
n_step_in_cycle = 120 # Number of time steps in one rotation period
5858

5959
et_begin = SPICE.utc2et("2027-02-18T00:00:00") # Start time of TPM
6060
et_end = et_begin + P₂ * n_cycle # End time of TPM
@@ -94,10 +94,6 @@
9494
ρ = 2170.0 # Density [kg/m³]
9595
Cₚ = 600.0 # Heat capacity [J/kg/K]
9696

97-
l₁ = AsteroidThermoPhysicalModels.thermal_skin_depth(P₁, k, ρ, Cₚ) # Thermal skin depth for Didymos
98-
l₂ = AsteroidThermoPhysicalModels.thermal_skin_depth(P₂, k, ρ, Cₚ) # Thermal skin depth for Dimorphos
99-
Γ = AsteroidThermoPhysicalModels.thermal_inertia(k, ρ, Cₚ) # Thermal inertia for Didymos and Dimorphos [tiu]
100-
10197
R_vis = 0.059 # Reflectance in visible light [-]
10298
R_ir = 0.0 # Reflectance in thermal infrared [-]
10399
ε = 0.9 # Emissivity [-]
@@ -106,8 +102,8 @@
106102
n_depth = 41 # Number of depth steps
107103
Δz = z_max / (n_depth - 1) # Depth step width [m]
108104

109-
thermo_params1 = AsteroidThermoPhysicalModels.ThermoParams(P₁, l₁, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
110-
thermo_params2 = AsteroidThermoPhysicalModels.ThermoParams(P₂, l₂, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
105+
thermo_params1 = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
106+
thermo_params2 = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
111107

112108
##= Setting of TPM =##
113109
stpm1 = AsteroidThermoPhysicalModels.SingleTPM(shape1, thermo_params1;

test/TPM_Ryugu/TPM_Ryugu.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
P = SPICE.convrt(7.63262, "hours", "seconds") # Rotation period of Ryugu
4747

4848
n_cycle = 2 # Number of cycles to perform TPM
49-
n_step_in_cycle = 72 # Number of time steps in one rotation period
49+
n_step_in_cycle = 120 # Number of time steps in one rotation period
5050

5151
et_begin = SPICE.utc2et("2018-07-01T00:00:00") # Start time of TPM
5252
et_end = et_begin + P * n_cycle # End time of TPM
@@ -74,7 +74,7 @@
7474
k = 0.1 # Thermal conductivity [W/m/K]
7575
ρ = 1270.0 # Density [kg/m³]
7676
Cₚ = 600.0 # Heat capacity [J/kg/K]
77-
77+
7878
l = AsteroidThermoPhysicalModels.thermal_skin_depth(P, k, ρ, Cₚ) # Thermal skin depth [m]
7979
Γ = AsteroidThermoPhysicalModels.thermal_inertia(k, ρ, Cₚ) # Thermal inertia [tiu]
8080

@@ -83,10 +83,10 @@
8383
ε = 1.0 # Emissivity [-]
8484

8585
z_max = 0.6 # Depth of the lower boundary of a heat conduction equation [m]
86-
n_depth = 41 # Number of depth steps
86+
n_depth = 61 # Number of depth steps
8787
Δz = z_max / (n_depth - 1) # Depth step width [m]
8888

89-
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(P, l, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
89+
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
9090

9191
##= Setting of TPM =##
9292
stpm = AsteroidThermoPhysicalModels.SingleTPM(shape, thermo_params;

test/TPM_non-uniform_thermoparams/TPM_non-uniform_thermoparams.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,18 @@
8787
"""
8888

8989
k = [r[3] > 0 ? 0.1 : 0.3 for r in shape.face_centers] # Thermal conductivity [W/m/K]
90-
ρ = 1270.0 # Density [kg/m³]
91-
Cₚ = 600.0 # Heat capacity [J/kg/K]
92-
93-
l = AsteroidThermoPhysicalModels.thermal_skin_depth(P, k, ρ, Cₚ) # Thermal skin depth [m]
94-
Γ = AsteroidThermoPhysicalModels.thermal_inertia(k, ρ, Cₚ) # Thermal inertia [tiu]
90+
ρ = fill(1270.0, n_face) # Density [kg/m³]
91+
Cₚ = fill(600.0, n_face) # Heat capacity [J/kg/K]
9592

9693
R_vis = [r[3] > 0 ? 0.04 : 0.1 for r in shape.face_centers] # Reflectance in visible light [-]
97-
R_ir = [r[3] > 0 ? 1.0 : 0.9 for r in shape.face_centers] # Reflectance in thermal infrared [-]
94+
R_ir = [r[3] > 0 ? 0.0 : 0.0 for r in shape.face_centers] # Reflectance in thermal infrared [-]
9895
ε = fill(1.0, n_face) # Emissivity [-]
9996

10097
z_max = 0.6 # Depth of the lower boundary of a heat conduction equation [m]
10198
n_depth = 41 # Number of depth steps
10299
Δz = z_max / (n_depth - 1) # Depth step width [m]
103100

104-
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(P, l, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
101+
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
105102

106103
##= Setting of TPM =##
107104
stpm = AsteroidThermoPhysicalModels.SingleTPM(shape, thermo_params;

test/TPM_zero-conductivity/TPM_zero-conductivity.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
n_face = length(shape.faces) # Number of faces
3636

3737
##= Thermal properties: zero-conductivity case =##
38-
l = 0.0 # Thermal skin depth [m]
39-
Γ = 0.0 # Thermal inertia [J m⁻² K⁻¹ s⁻¹/2]
38+
k = 0.0 # Thermal conductivity [W/m/K]
39+
ρ = 1270.0 # Density [kg/m³]
40+
Cₚ = 600.0 # Heat capacity [J/kg/K]
4041

4142
R_vis = 0.1 # Reflectance in visible light [-]
4243
R_ir = 0.0 # Reflectance in thermal infrared [-]
@@ -46,7 +47,7 @@
4647
n_depth = 41 # Number of depth steps
4748
Δz = z_max / (n_depth - 1) # Depth step width [m]
4849

49-
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(P, l, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
50+
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
5051

5152
##= Setting of TPM =##
5253
stpm = AsteroidThermoPhysicalModels.SingleTPM(shape, thermo_params;

test/heat_conduction_1D.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
)
2121

2222
##= Thermal properties =##
23-
P = 1.0
24-
k = 1.0
25-
ρ = 1.0
26-
Cₚ = 1.0
27-
28-
l = AsteroidThermoPhysicalModels.thermal_skin_depth(P, k, ρ, Cₚ)
29-
Γ = AsteroidThermoPhysicalModels.thermal_inertia(k, ρ, Cₚ)
23+
k = 0.1 # Thermal conductivity [W/m/K]
24+
ρ = 1270.0 # Density [kg/m³]
25+
Cₚ = 600.0 # Heat capacity [J/kg/K]
3026

3127
R_vis = 0.0 # Reflectance in visible light [-]
3228
R_ir = 0.0 # Reflectance in thermal infrared [-]
@@ -36,7 +32,7 @@
3632
n_depth = 101 # Number of depth steps
3733
Δz = z_max / (n_depth - 1) # Depth step width [m]
3834

39-
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(P, l, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
35+
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
4036

4137
##= TPMs with different solvers =##
4238
SELF_SHADOWING = false

test/thermal_radiation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
n_depth = 41 # Number of depth steps
6969
Δz = z_max / (n_depth - 1) # Depth step width [m]
7070

71-
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(P, l, Γ, R_vis, R_ir, ε, z_max, Δz, n_depth)
71+
thermo_params = AsteroidThermoPhysicalModels.ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
7272

7373
##= Setting of TPM =##
7474
stpm = AsteroidThermoPhysicalModels.SingleTPM(shape, thermo_params;

0 commit comments

Comments
 (0)