utopia.objects_generation ========================= .. py:module:: utopia.objects_generation .. autoapi-nested-parse:: Contains all the functions to generate the model objects: model box, model compartments and the model particles (MP ans SPM) Classes ------- .. autoapisummary:: utopia.objects_generation.Box utopia.objects_generation.Compartment utopia.objects_generation.compartment_water utopia.objects_generation.compartment_surfaceSea_water utopia.objects_generation.compartment_sediment utopia.objects_generation.compartment_soil_surface utopia.objects_generation.compartment_deep_soil utopia.objects_generation.compartment_air utopia.objects_generation.Particulates utopia.objects_generation.ParticulatesBF utopia.objects_generation.ParticulatesSPM Functions --------- .. autoapisummary:: utopia.objects_generation.generate_objects Module Contents --------------- .. py:class:: Box(Bname, Bdepth_m=None, Blength_m=None, Bwidth_m=None, Bvolume_m3=None, Bconexions=None) Class box generates one object box representing the unit world in the case of the UTOPIA parameterization that can contain 17 compartments and that can have conexions to other boxes (for example if conecting several UTOPIA boxes to give spatial resolution) .. py:attribute:: description :value: 'Generic Box class' .. py:attribute:: Bname .. py:attribute:: Bdepth_m :value: None .. py:attribute:: Blength_m :value: None .. py:attribute:: Bwidth_m :value: None .. py:attribute:: Bvolume_m3 :value: None .. py:attribute:: compartments :value: [] .. py:attribute:: Bconexions :value: None .. py:method:: __repr__() .. py:method:: add_compartment(comp) .. py:method:: calc_Bvolume_m3() .. py:class:: Compartment(Cname, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None) Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: Cname .. py:attribute:: Cdepth_m :value: None .. py:attribute:: Clength_m :value: None .. py:attribute:: Cwidth_m :value: None .. py:attribute:: Cvolume_m3 :value: None .. py:attribute:: CsurfaceArea_m2 :value: None .. py:attribute:: particles .. py:attribute:: processess :value: ['degradation', 'fragmentation', 'heteroaggregation', 'heteroaggregate_breackup', 'biofouling',... .. py:attribute:: connexions :value: [] .. py:method:: assign_box(Box) .. py:method:: add_particles(particle) .. py:method:: calc_volume() .. py:method:: calc_vol_fromBox() .. py:method:: calc_particleConcentration_Nm3_initial() .. py:class:: compartment_water(Cname, SPM_mgL, waterFlow_m3_s, T_K, G, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None, flowVelocity_m_s=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: SPM_mgL .. py:attribute:: flowVelocity_m_s :value: None .. py:attribute:: waterFlow_m3_s .. py:attribute:: T_K .. py:attribute:: G .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'heteroaggregation', 'heteroaggregate_breackup',... .. py:class:: compartment_surfaceSea_water(Cname, SPM_mgL, waterFlow_m3_s, T_K, G, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None, flowVelocity_m_s=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: SPM_mgL .. py:attribute:: flowVelocity_m_s :value: None .. py:attribute:: waterFlow_m3_s .. py:attribute:: T_K .. py:attribute:: G .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'heteroaggregation', 'heteroaggregate_breackup',... .. py:class:: compartment_sediment(Cname, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'sediment_resuspension', 'burial'] .. py:class:: compartment_soil_surface(Cname, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'runoff_transport', 'percolation', 'soil_air_resuspension',... .. py:class:: compartment_deep_soil(Cname, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'sequestration_deep_soils', 'soil_convection'] .. py:class:: compartment_air(Cname, T_K=None, wind_speed_m_s=None, I_rainfall_mm=None, Cdepth_m=None, Clength_m=None, Cwidth_m=None, Cvolume_m3=None, CsurfaceArea_m2=None, flowVelocity_m_s=None) Bases: :py:obj:`Compartment` Class Compartment (parent class) generates compartment objects that belong by default to an assigned model box (Cbox). Each compartment contains four different particle objects corresponding to the 4 described aggregation states of UTOPIA (freeMP, heterMP, biofMP, heterBiofMP) and the processes that can occur in the compartment are listed under the processess attribute. Each compartment has a set of connexions withing the UTOPIA box listed in the conexions attribute wich will be asigned by reading on the conexions input file of the model. .. py:attribute:: T_K :value: None .. py:attribute:: wind_speed_m_s :value: None .. py:attribute:: I_rainfall_mm :value: None .. py:attribute:: flowVelocity_m_s :value: None .. py:attribute:: processess :value: ['discorporation', 'fragmentation', 'wind_trasport', 'dry_deposition', 'wet_deposition'] .. py:class:: Particulates(Pname, Pform, Pcomposition, Pdensity_kg_m3, Pshape, PdimensionX_um, PdimensionY_um, PdimensionZ_um, t_half_d=5000, Pnumber_t0=None) Class Particulates generates particulate objects, especifically microplastic particle objects. The class defines a particle object by its composition, shape and dimensions .. py:attribute:: Pname .. py:attribute:: Pform .. py:attribute:: Pcomposition .. py:attribute:: Pdensity_kg_m3 .. py:attribute:: Pshape .. py:attribute:: PdimensionX_um .. py:attribute:: PdimensionY_um .. py:attribute:: PdimensionZ_um .. py:attribute:: PdimensionX_m .. py:attribute:: PdimensionY_m .. py:attribute:: PdimensionZ_m .. py:attribute:: Pnumber_t0 :value: None .. py:attribute:: radius_m .. py:attribute:: diameter_m .. py:attribute:: diameter_um .. py:attribute:: Pemiss_t_y :value: 0 .. py:attribute:: t_half_d :value: 5000 .. py:method:: __repr__() .. py:method:: calc_volume() Particle volume calculation. Different formulas for different particle shapes, currently defined for spheres, fibres, cylinders, pellets and irregular fragments .. py:method:: calc_numConc(concMass_mg_L, concNum_part_L) .. py:method:: assign_compartment(comp) .. py:class:: ParticulatesBF(parentMP, spm) Bases: :py:obj:`Particulates` This is a class to create ParticulatesBIOFILM objects .. py:attribute:: species :value: 'particulate' .. py:attribute:: Pname .. py:attribute:: Pcomposition .. py:attribute:: Pform :value: 'biofMP' .. py:attribute:: parentMP .. py:attribute:: BF_density_kg_m3 .. py:attribute:: BF_thickness_um .. py:attribute:: radius_m .. py:attribute:: diameter_m .. py:attribute:: diameter_um .. py:attribute:: t_half_d :value: 25000 .. py:attribute:: Pshape .. py:attribute:: Pdensity_kg_m3 .. py:attribute:: PdimensionX_m :value: 0.0 .. py:attribute:: PdimensionY_m :value: 0.0 .. py:attribute:: PdimensionZ_m :value: 0.0 .. py:class:: ParticulatesSPM(parentSPM, parentMP) Bases: :py:obj:`Particulates` This is a class to create ParticulatesSPM objects .. py:attribute:: species :value: 'particulate' .. py:attribute:: Pname .. py:attribute:: Pcomposition .. py:attribute:: parentMP .. py:attribute:: parentSPM .. py:attribute:: Pdensity_kg_m3 .. py:attribute:: radius_m .. py:attribute:: diameter_m .. py:attribute:: diameter_um .. py:attribute:: Pshape .. py:method:: calc_volume_heter(parentMP, parentSPM) .. py:function:: generate_objects() Function for generating the UTOPIA model objects: model box, model compartments and the model particles