Go to the documentation of this file.
53 scat_meta_array.resize(0);
67 const String& particle_type,
69 const Vector& aspect_ratio_grid,
70 const Vector& diameter_max_grid,
76 for(
Index k=0; k<diameter_max_grid.
nelem(); k++)
78 for (
Index i=0; i < aspect_ratio_grid.
nelem(); i++ )
83 if (shape ==
"spheroidal")
85 if (aspect_ratio_grid[i]>1)
89 a=diameter_max_grid[k]/2.;
90 volume=pow(a,3.)*4.*
PI/(3.*aspect_ratio_grid[i]);
93 else if (aspect_ratio_grid[i]<1)
97 b=diameter_max_grid[k]/2.;
98 volume=pow(b,3.)*4.*
PI*pow(aspect_ratio_grid[i],2.)/3.;
104 os <<
"Incorrect aspect ratio: " << aspect_ratio_grid[i] <<
"\n"
105 <<
"Can not be equal to one";
106 throw std::runtime_error(os.str());
109 else if (shape ==
"cylindrical")
117 volume=pow(diameter_max_grid[k]/pow((pow(aspect_ratio_grid[i], 2.)+1.), 1./2.), 3)*pow(aspect_ratio_grid[i], 2.)*
PI/4.;
123 os <<
"Unknown particle shape: " << shape <<
"\n"
124 <<
"Must be spheroidal or cylindrical";
125 throw std::runtime_error(os.str());
132 os << shape<<
" "<< material <<
" particle of type " << particle_type<<
133 ", with volume equivalent diameter "
134 <<diameter_max_grid[k]<<
" meters.";
153 scat_meta_array.push_back(smd);
171 for(
Index ii=0;ii<scat_meta_array.
nelem();ii++)
179 const Index nf = scat_meta_array[ii].scat_f_grid.
nelem();
180 const Index nt = scat_meta_array[ii].scat_T_grid.
nelem();
182 complex_refr_index.
resize(nf,nt,2);
185 scat_meta_array[ii].complex_refr_index,
"complex_refr_index",
186 scat_meta_array[ii].scat_f_grid, scat_meta_array[ii].scat_T_grid);
193 sdd.
f_grid = scat_meta_array[ii].scat_f_grid;
194 sdd.
T_grid = scat_meta_array[ii].scat_T_grid;
199 if (scat_meta_array[ii].shape ==
"spheroidal" )
202 else if (scat_meta_array[ii].shape ==
"cylindrical")
207 os <<
"Unknown particle shape: " << scat_meta_array[ii].shape <<
"\n"
208 <<
"Must be spheroidal or cylindrical";
209 throw std::runtime_error(os.str());
215 pow(scat_meta_array[ii].volume*1e18*3./(4.*
PI),1./3.),
217 scat_meta_array[ii].aspect_ratio,
220 scat_data_array.push_back(sdd);
239 const String& description,
242 const String& particle_type,
245 const Vector& diameter_grid,
246 const Vector& scat_f_grid,
247 const Vector& scat_T_grid,
257 volume=4./3.*
PI*pow(diameter_grid[k]/2.,3);
262 if (shape ==
"spheroidal")
268 a=pow(3*volume*aspect_ratio/(4*
PI), 1./3.);
272 else if (aspect_ratio<1)
276 b=pow(3*volume/(4*
PI*pow(aspect_ratio, 2)),1./3.);
283 os <<
"Incorrect aspect ratio: " << aspect_ratio <<
"\n"
284 <<
"Can not be equal to one";
285 throw std::runtime_error(os.str());
288 else if (shape ==
"cylindrical")
295 D=pow(volume*4./
PI*aspect_ratio, 1./3.);
297 diameter_max=pow((pow(D,2)+pow(L,2)), 1./2.);
303 os <<
"Unknown particle shape: " << shape <<
"\n"
304 <<
"Must be spheroidal or cylindrical";
305 throw std::runtime_error(os.str());
312 os << shape<<
" "<< material <<
" particle of type " << particle_type<<
313 ", with volume equivalent diameter "
314 <<diameter_grid[k]<<
" meters.";
333 scat_meta_array.push_back(smd);
void complex_n_interp(MatrixView n_real, MatrixView n_imag, const GriddedField3 &complex_n, const String &varname, ConstVectorView f_grid, ConstVectorView t_grid)
complex_n_interp
@ PARTICLE_SSDMETHOD_TMATRIX
void calc_ssp_random_test(const Verbosity &verbosity)
Single scattering properties calculation for randomly oriented particles.
void calc_ssp_fixed_test(const Verbosity &verbosity)
Single scattering properties calculation for particles with fixed orientation.
void scat_data_arrayFromMeta(ArrayOfSingleScatteringData &scat_data_array, const ArrayOfScatteringMetaData &scat_meta_array, const Vector &za_grid, const Vector &aa_grid, const Numeric &precision, const Verbosity &)
WORKSPACE METHOD: scat_data_arrayFromMeta.
void tmatrix_tmd_test(const Verbosity &verbosity)
T-Matrix validation test.
void TMatrixTest(const Verbosity &verbosity)
WORKSPACE METHOD: TMatrixTest.
void calcSingleScatteringDataProperties(SingleScatteringData &ssd, ConstMatrixView ref_index_real, ConstMatrixView ref_index_imag, const Numeric equiv_radius, const Index np, const Numeric aspect_ratio, const Numeric precision)
Calculate SingleScatteringData properties.
void resize(Index p, Index r, Index c)
Resize function.
Structure which describes the single scattering properties of a particle or a particle distribution.
This can be used to make arrays out of anything.
void scat_meta_arrayInit(ArrayOfScatteringMetaData &scat_meta_array, const Verbosity &)
WORKSPACE METHOD: scat_meta_arrayInit.
Declarations having to do with the four output streams.
The implementation for String, the ARTS string class.
Declarations for the T-Matrix interface.
void scat_meta_arrayAddTmatrixOldVersion(ArrayOfScatteringMetaData &scat_meta_array, const GriddedField3 &complex_refr_index, const String &description, const String &material, const String &shape, const String &particle_type, const Numeric &density, const Numeric &aspect_ratio, const Vector &diameter_grid, const Vector &scat_f_grid, const Vector &scat_T_grid, const Verbosity &)
WORKSPACE METHOD: scat_meta_arrayAddTmatrixOldVersion.
Index nelem() const
Returns the number of elements.
void scat_meta_arrayAddTmatrix(ArrayOfScatteringMetaData &scat_meta_array, const GriddedField3 &complex_refr_index, const String &description, const String &material, const String &shape, const String &particle_type, const Numeric &density, const Vector &aspect_ratio_grid, const Vector &diameter_max_grid, const Vector &scat_f_grid, const Vector &scat_T_grid, const Verbosity &)
WORKSPACE METHOD: scat_meta_arrayAddTmatrix.
NUMERIC Numeric
The type to use for all floating point numbers.
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization.
ParticleType particle_type
Header file for special_interp.cc.
ParticleType ParticleTypeFromString(const String &particle_type_string)
Convert particle name to enum value.
INDEX Index
The type to use for all integer numbers and indices.
void tmatrix_ampld_test(const Verbosity &verbosity)
T-Matrix validation test.
Index nelem() const
Number of elements.