Skip to content

Commit a24b71b

Browse files
chore: bump version to 0.2.1 (#216)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 903edfb commit a24b71b

4 files changed

Lines changed: 75 additions & 37 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.1] - 2026-06-26
11+
12+
No migration required from v0.2.0.
13+
14+
### Added
15+
16+
- `*Ephemerides` constructors now accept `AbstractRange` for `times` (e.g. `range(et_begin, et_end; length=n)`); the range is collected to `Vector{Float64}` internally, eliminating the manual `collect` call
17+
- `*Ephemerides` constructors now auto-convert plain `Vector` inputs to `Vector{SVector{3,Float64}}` for position vectors and `Vector{SMatrix{3,3,Float64,9}}` for rotation matrices; no need to import `StaticArrays` at the call site
18+
19+
### Internal
20+
21+
- Renamed `energy_in` / `energy_out` fields to `absorbed_power` / `emitted_power` in the diagnostics data — aligns the implementation with the documented names; these fields are not exported
22+
1023
## [0.2.0] - 2026-06-24
1124

1225
This release introduces a Problem-Solver API redesign inspired by `DifferentialEquations.jl`.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AsteroidThermoPhysicalModels"
22
uuid = "ab46f4a3-3c83-4d86-98d6-41a8b1a2e76e"
33
authors = ["Masanori Kanamaru"]
4-
version = "0.2.1-DEV"
4+
version = "0.2.1"
55

66
[deps]
77
AsteroidShapeModels = "a7943d8e-5d65-4248-ae23-0082f5115a05"

README.md

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ pkg> add AsteroidThermoPhysicalModels
4646
- **Yarkovsky Effect**: Orbital perturbation due to asymmetric thermal emission
4747
- **YORP Effect**: Rotational perturbation due to asymmetric thermal emission
4848

49-
## 🆕 What's New in v0.2.0
49+
## 🆕 What's New in v0.2.x
50+
51+
### v0.2.1
52+
53+
- `*Ephemerides` constructors now accept `AbstractRange` for `times` — no need to call `collect` beforehand
54+
- `*Ephemerides` constructors now auto-convert plain arrays to `SVector`/`SMatrix` — no need to import `StaticArrays`
55+
56+
### v0.2.0
5057

5158
This release introduces a **Problem-Solver API** inspired by `DifferentialEquations.jl`, replacing the old `run_TPM!` function.
5259

@@ -87,46 +94,61 @@ Temperature distribution of asteroid Didymos and its satellite Dimorphos:
8794

8895
## 📖 Basic Usage
8996

97+
The workflow follows a **Problem → Solve → Export** pattern.
98+
9099
```julia
91100
using AsteroidShapeModels
92101
using AsteroidThermoPhysicalModels
93102

94-
95-
# Load an asteroid shape model
96-
# - `path/to/shape.obj` is the path to your OBJ file (mandatory)
97-
# - `scale` : scale factor for the shape model (e.g., 1000 for km to m conversion)
98-
shape = load_shape_obj("path/to/shape.obj"; scale=1000)
99-
100-
# Set thermal parameters
101-
thermo_params = ThermoParams(
102-
8.0 * 3600, # Rotation period [s]
103-
0.05, # Thermal skin depth [m]
104-
200.0, # Thermal inertia [J m⁻² K⁻¹ s⁻¹/²]
105-
0.1, # Reflectance in visible light [-]
106-
0.0, # Reflectance in thermal infrared [-]
107-
0.9, # Emissivity [-]
108-
0.5, # Depth of lower boundary [m]
109-
0.0125, # Depth step width [m]
110-
41 # Number of depth steps
103+
# --- Shape model ---
104+
shape = load_shape_obj("path/to/shape.obj"; scale=1000, with_face_visibility=true, with_bvh=true)
105+
106+
# --- Ephemerides ---
107+
# `times` : epochs [s], any AbstractRange or Vector{Float64}
108+
# `r_sun` : Sun position in body-fixed frame [m], Vector of length-3 arrays
109+
# (typically computed from SPICE kernels — see integration test examples)
110+
ephem = SingleAsteroidEphemerides(times, r_sun)
111+
112+
# --- Thermal parameters ---
113+
k = 0.1 # Thermal conductivity [W/m/K]
114+
ρ = 1270.0 # Density [kg/m³]
115+
Cₚ = 600.0 # Heat capacity [J/kg/K]
116+
R_vis = 0.04 # Reflectance in visible light [-]
117+
R_ir = 0.0 # Reflectance in thermal infrared [-]
118+
ε = 1.0 # Emissivity [-]
119+
z_max = 0.6 # Lower boundary depth [m]
120+
n_depth = 61 # Number of depth nodes
121+
Δz = z_max / (n_depth - 1)
122+
123+
thermo_params = ThermoParams(k, ρ, Cₚ, R_vis, R_ir, ε, z_max, Δz, n_depth)
124+
125+
# --- Problem definition ---
126+
problem = SingleAsteroidThermoPhysicalProblem(shape, thermo_params;
127+
with_self_shadowing = true,
128+
with_self_heating = true,
129+
upper_boundary_condition = RadiationBoundaryCondition(),
130+
lower_boundary_condition = InsulationBoundaryCondition(),
111131
)
112132

113-
# Create TPM model with solver selection
114-
stpm = SingleAsteroidTPM(shape, thermo_params;
115-
SELF_SHADOWING = true,
116-
SELF_HEATING = true,
117-
SOLVER = CrankNicolsonSolver(thermo_params), # Choose solver
118-
BC_UPPER = RadiationBoundaryCondition(),
119-
BC_LOWER = InsulationBoundaryCondition()
120-
)
133+
# --- Output specification ---
134+
output_times = ephem.times[end-119:end] # final rotation period
135+
subsurface_face_ids = [1, 2, 3] # faces for saving subsurface temperature profiles
136+
output = SingleAsteroidOutputSpec(output_times, subsurface_face_ids)
121137

122-
# Available solvers:
123-
# - ExplicitEulerSolver(thermo_params) # Fast but requires small time steps
124-
# - ImplicitEulerSolver(thermo_params) # Stable for any time step
125-
# - CrankNicolsonSolver(thermo_params) # Best accuracy
138+
# --- Solve ---
139+
solution = solve(problem, CrankNicolson();
140+
ephem = ephem,
141+
output = output,
142+
initial_temperature = 200.0, # [K]
143+
)
126144

127-
# Run simulation - see documentation for complete examples
145+
# --- Export results ---
146+
export_solution("output/", solution)
147+
# Writes: diagnostics.csv, surface_temperature.csv, subsurface_temperature.csv
128148
```
129149

150+
For a complete end-to-end example with SPICE ephemerides, see [test/TPM_Ryugu/TPM_Ryugu.jl](test/TPM_Ryugu/TPM_Ryugu.jl).
151+
130152
## 📊 Output
131153

132154
The package produces detailed output files including:

ROADMAP.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,20 @@ Redesign the API around a Problem-Solver pattern inspired by `DifferentialEquati
8282
**↓ Planned Releases ↓**
8383
---
8484

85-
## v0.2.1 - Patch Fixes (Target: 2026)
85+
## v0.2.1 - Patch Fixes (Released: 2026-06-26)
8686

8787
Non-breaking fixes and convenience improvements before the v0.3.0 surface roughness work.
8888

89-
- [ ] **Rename internal `energy_in` / `energy_out`** to `absorbed_power` / `emitted_power` — current names are physically inaccurate (units are W, not J); not exported so no breaking change
89+
- [x] **Rename internal `energy_in` / `energy_out`** to `absorbed_power` / `emitted_power` — current names are physically inaccurate (units are W, not J); not exported so no breaking change
9090
- [x] **`*Ephemerides` convenience constructors**`times` accepts any `AbstractRange` (e.g. `range(et_begin, et_end; length=n)`) and is automatically collected to `Vector{Float64}`, eliminating the separate `collect` call; purely additive
91-
- [ ] **Test prefix cleanup** — remove unnecessary `AsteroidThermoPhysicalModels.` prefixes from exported symbols in test files
91+
- [x] **`*Ephemerides` auto-conversion** — constructors accept plain `Vector` inputs for position and rotation fields and convert to `SVector`/`SMatrix` internally; no need to import `StaticArrays` at the call site
92+
- [x] **Test prefix cleanup** — remove unnecessary `AsteroidThermoPhysicalModels.` prefixes from exported symbols in test files
9293

93-
## v0.3.0 - Surface Roughness Support (Target: 2026)
94+
## v0.3.0 - Surface Roughness Support + ThermoParams Redesign (Target: 2026)
9495

95-
Introduce thermophysical modeling of surface roughness using `HierarchicalShapeModel` from `AsteroidShapeModels.jl`, built on the clean Problem-Solver architecture established in v0.2.0. Each global face can optionally carry a roughness model, and an independent mini-TPM is run on its sub-faces (Full Sub-facet TPM). This is the most physically accurate approach and provides a basis for validating simpler approximations in the future.
96+
Introduce thermophysical modeling of surface roughness using `HierarchicalShapeModel` from `AsteroidShapeModels.jl`. This release also redesigns `ThermoParams` to separate material properties from numerical grid settings — a prerequisite for clean per-face material access in the roughness model.
97+
98+
- [ ] **`ThermoParams` / `GridParams` redesign** (breaking): `ThermoParams` holds material properties only; new `GridParams` holds numerical grid settings; problem constructor expands scalar input to per-face `Vector{ThermoParams}` at construction time
9699

97100
- [ ] **Roughness-aware problem type**: extend the problem type to accept `HierarchicalShapeModel` and hold independent sub-face state (illumination, flux, temperature, thermal force) for each face
98101

0 commit comments

Comments
 (0)