tardis.workflows.v_inner_solver module¶
- class tardis.workflows.v_inner_solver.InnerVelocitySolverWorkflow(configuration, mean_optical_depth='rosseland', tau=None)[source]¶
Bases:
SimpleTARDISWorkflow
- TAU_TARGET = -0.40546510810816444¶
- check_convergence(estimated_values)[source]¶
Check convergence status for a dict of estimated values
- Parameters:
- estimated_valuesdict
Estimates to check convergence
- Returns:
- bool
If convergence has occurred
- estimate_v_inner()[source]¶
Compute the Rosseland Mean Optical Depth, Estimate location where v_inner makes t=2/3 (or target) Extrapolate with exponential fits
Need some way to return and inspect the optical depths for later logging
- get_convergence_estimates(transport_state)[source]¶
Compute convergence estimates from the transport state
- Parameters:
- transport_stateMonteCarloTransportState
Transport state object to compute estimates
- Returns:
- dict
Convergence estimates
- EstimatedRadiationFieldProperties
Dilute radiation file and j_blues dataclass
- property property_mask¶
- reproject(array_one, mask_one, array_two, mask_two)[source]¶
Reprojects two sub_arrays defined by a set of masks onto an array where the masks of both objects are true
- let A1, A2 be arrays of size gemetry.no_of_shells and
a1 = A1[mask_one], a2 = A2[mask_two]
- find a1*, a2* s.t.
a1* = A1[mask_one & mask_two], a2* = A2[mask_one & mask_two]
- this is equivalent to
a1* = A1[mask_one][mask_two[mask_one]] = a1[mask_two[mask_one]], a2* = A2[mask_two][mask_one[mask_two]] = a2[mask_one[mask_two]]
- Parameters:
- array1np.ndarray
A sub array of an array with the shape of a geometry property
- mask_onenp.ndarray(bool)
Mask such that the parrent array accessed at this mask gives a1
- array_twonp.ndarray
A sub array of an array with the shape of a geometry property
- mask_twonp.ndarray(bool)
Mask such that the parrent array accessed at this mask gives a2
- Returns:
- array_one*
reprojection of array_one onto mask_one & mask_two
- array_two*
reprojection of array_two onto mask_one & mask_two
- solve_plasma(estimated_radfield_properties, mask)[source]¶
Update the plasma solution with the new radiation field estimates
- Parameters:
- estimated_radfield_propertiesEstimatedRadiationFieldProperties
The radiation field properties to use for updating the plasma
- radiation_field: tardis.plasma.radiation_field.RadiationField
Current radiation field object from the last iteration
- Raises:
- ValueError
If the plasma solver radiative rates type is unknown