hydrac.model.particle¶
Particle properties (hydrac.model.particle)¶
-
class
hydrac.model.particle.Particle(name=None, default=None, rhos=None, c=None, cs=None, cp=None, mtype=None, nature=None, shape=None, mod_num=None, *args)[source]¶ Bases:
hydrac.model.model.ModelParticle properties class.
Base class :
hydrac.model.model.ModelThis class prepares the computation of the scattering models. Indeed, the scattering properties of particles greatly differ given their shape, their density compared to the one of the surrounding water or the sound speed in the particles compared to the on in water (acoustic impedence contrasts).
Also, several methods exist to compute a model. Those can be empirical, parametric, exact, approximated… All these techniques can be of interest for diverse communities and are gathered here in hydrac.
The following class makes a distinction between organic and mineral like particles, as being the source of major differences in terms of model approximations and computational strategy used. Also, a distinction is made between theory-based and empirism-based models for the same reason.
For the generation of a new scattering model, all this information needs to be prompted by the user when asked.
The following models can be designed :
1 - Analytical modal series solution for elastic spheres (Gaunaurd & Uberall 1983), straigt and bent cylinders (Stanton et al. 1988).
2 - Distorted Wave Born Approximation (DWBA) models for weakly-scattering bodies (fluid-like zooplankton), arbitrarily shaped with circular cross-section (spheres, prolate/oblate spheroïds, straight cylinders, uniformly bent cylinders, …) (Stanton et al. 1998).
(N.B. In this case the chosen model name has to contain “DWBA”)
3 - Heuristic hybrid models for marine and estuarine aggregates formed under the process of flocculation (Thorne et al 2014)
4 - Heuristic and high-pass empirical models (Thorne & Hanes 2002, Stanton et al. 1989)
All the parameters indicated by the user are saved in a modified dictionnary
paramfrom the classhydrac.util.parameters.AttrDict, and are further accessed by the classhydrac.model.scattering.scattering.Scatteringto compute the model.Description of the paramfor particle properties¶Parameter Name Type Description \(c_p\) float Compressional sound velocity in the particle \(c_s\) float Shear sound velocity in the particle \(c\) float Apparent velocity \(c=\sqrt(c_p^2-\frac{4}{3}c_s^2)\) mod_num int Number of modes to compute the analytical solution for THQ models (set to 0 otherwise ) \(rhos\) float Particle density \(C_f\) float Flocculation degree (only for HYB models) \(m\) float Fractal exponent (only for HYB models) \(shape\) hydrac.util.parameters.AttrDictAnimal shape-related parameters (for DWBA models) \(phy\) hydrac.util.parameters.AttrDictAnimal physical properties (for DWBA models) \(simu\) hydrac.util.parameters.AttrDictDWBA simulation parameters (for DWBA models) A typical example of a model parameters creation is as follows:
# We want to design a model names 'Model_1' >>> P=Particle('Model_1') # This model is not in the databese, so the user is prompted for the # model type Model type : THQ, EMP or HP? THQ # The user is prompted for the particle nature: What nature : ORG, MIN or HYB ? MIN # The user is prompted fot the particle shape. What shape : SPH or sCYL or bCYL ? SPH # The user is then prompted for the particles physical properties Density (kg/m^3): 2650 Compressional velocity in the particle (m/s) : 5500 Shear velocity in the particle (m/s) : 3500 Number of modes to compute in the modal series soltion ? 20 # The user is then asked whether he wishes to save the current presets. Do you want to save the custom model ? [Y/n] Y # In that case, the presets are saved in an xml file an the next time the # user wants to use this model no more prompts will appear >>>P2=hydrac.model.particle.Particle('Model_1')-
param_init(self)[source]¶ Either fills the
parammodified dictionnary with the information loaded from the xml file if the model already exists, or prompts the user for extra information.
-
dwba_init(self)[source]¶ This method prompts the user for the numerous parameters necessary to compute a DWBA model. All the information is divided into three categories, each taking the form of a modified dictionnary from the class
hydrac.util.parameters.AttrDict:- shape : Shape-related information about the animal such as aspect ratio, preferential orientation angle and associated standard deviation, radius of curvature in case of uniformly bent cylinder…
- phy : Information related to the acoustic impedence contrast between the animal and the water (ratio of densities, of sound velocities, velocity of sound in water)
- simu : Information necessary for the numeriocal simulation such as the number of integration points along the animal main axis, the type of distribution of length and orientation for potential averaging of the model over angle distribution and size distribution…
-
Classes
Particle([name, default, rhos, c, cs, cp, …]) |
Particle properties class. |
Exceptions
ParticleNatureError |