tardis.workflows.v_inner_solver module¶
- class tardis.workflows.v_inner_solver.InnerVelocitySolverWorkflow(*args, **kwargs)[source]¶
 Bases:
StandardTARDISWorkflowA simple TARDIS workflow that runs a simulation to convergence
- Parameters:
 - configurationConfiguration
 Configuration object for the simulation
- csvybool, optional
 Set true if the configuration uses CSVY, by default False
- LOG_TAU_TARGET = np.float64(-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()[source]¶
 Compute convergence estimates from the transport state
- 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
- reshape_store_plasma_state(executed_iterations)[source]¶
 Reshapes the storage arrays in case convergence was reached before all specified iterations were executed.
- Parameters:
 - executed_iterationsint
 iteration index, i.e. number of iterations executed minus one!
- 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
- solve_simulation_state(estimated_values)[source]¶
 Update the simulation state with new inputs computed from previous iteration estimates.
- Parameters:
 - estimated_valuesdict
 Estimated from the previous iterations
- Returns:
 - next_valuesdict
 The next values assigned to the simulation state
- store_plasma_state(i, num_active_shells, t_radiative, dilution_factor, electron_densities, t_inner, v_inner_boundary, tau_integ)[source]¶
 Store current plasma information, including the velocity of the inner boundary and the Rosseland mean optical depth, used in iterated i.
- Parameters:
 - iint
 current iteration index (0 for the first)
- num_active_shellsint
 number of active shells
- t_radastropy.units.Quantity
 radiation temperature
- dilution_factornp.ndarray
 dilution factor
- electron_densitiesnp.ndarray
 electron density
- t_innerastropy.units.Quantity
 temperature of inner boundary
- v_inner_boundaryastropy.units.Quantity
 velocity of inner boundary
- tau_integnp.ndarray
 Rosseland mean optical depth