pyRTX.core.physical_utils
Functions
|
Compute the SRP force |
|
Preprocess the RTX output to obtain the information required |
|
Get the material properties and set up an array for handling Parameters: material_dict: a dictionary with the shape: {'props': dictionary of properties for each material, 'idxs': indexes of faces associated with each material} |
|
Core of SRP computation. |
- pyRTX.core.physical_utils.preprocess_RTX_geometry(mesh_obj)[source]
Preprocess the RTX output to obtain the information required
- pyRTX.core.physical_utils.preprocess_materials(material_dict)[source]
Get the material properties and set up an array for handling Parameters: material_dict: a dictionary with the shape:
{‘props’: dictionary of properties for each material, ‘idxs’: indexes of faces associated with each material}
Returns: prop_container: a (len(mesh), 2) numpy array containing [specular, diffuse] coefficients for each face of the mesh
- pyRTX.core.physical_utils.srp_core(flux, indexes_tri, indexes_ray, N, S, norm_factor, mesh_obj, materials='None', diffusion=False, num_diffuse=None, diffusion_pack=None)[source]
Core of SRP computation. Highly vectorized version. For explicit algorithm implementation refer to the old version
Parameters: flux: solar flux (float, W/m^2) indexes_tri: indexes of intersected triangles indexes_ray: indexes of intersecting rays N: normals S: incident direction vectors norm_factor: normalization factor computed from ray spacing (float) mesh_obj: trimesh.Trimesh object [Not used for now, will be used when interrogating mesh
for surface properties]
Returns: force: np.array of SRP force
- pyRTX.core.physical_utils.compute_srp(flux, mesh_obj, index_tri, index_ray, location, ray_origins, ray_directions, pixel_spacing, materials='None', grouped=True, diffusion=False, num_diffuse=None, diffusion_pack=None)[source]
Compute the SRP force
Parameters: flux: Solar input flux [W/m^2] A: areas of the mesh faces s: incident ray directions r: reflcted ray directions n: normal unit vector to the faces