ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_IBSEBMaterials.H
Go to the documentation of this file.
1 #ifndef ERF_IBSEB_MATERIALS_H
2 #define ERF_IBSEB_MATERIALS_H
3 
4 #include <AMReX_REAL.H>
5 #include <AMReX_Vector.H>
6 #include <string>
7 
8 /**
9  * \file ERF_IBSEBMaterials.H
10  * \brief Material library of the building faces.
11  *
12  * The CSV schema is the one of the ERF-SLUCM branch's material library, so
13  * the same file serves both models:
14  *
15  * mat_id,name,albedo,emissivity,k_therm_W_per_mK,rho_cp_J_per_m3K,thickness_m,description
16  *
17  * The I/O rank reads the file and broadcasts the entries as plain data;
18  * every rank then holds the same table. A face gets its material from its
19  * building (``erf.ibseb.material_by_building``) or the default
20  * (``erf.ibseb.material_default``); without a file every face uses the
21  * uniform properties of the inputs.
22  */
24 {
25  int mat_id = 0;
28  amrex::Real k_therm = 1.0; ///< [W/m/K]
29  amrex::Real rho_cp = 1.6e6; ///< [J/m3/K]
30  amrex::Real thickness = 0.3; ///< [m]
31  char name[64] = "uniform";
32 };
33 
34 /**
35  * Read the material CSV on the I/O rank and broadcast it. Aborts on a
36  * missing file, a header that does not match the schema, a duplicate id,
37  * or a value outside its physical range.
38  */
39 amrex::Vector<IBSEBMaterial> read_ibseb_materials (const std::string& file);
40 
41 #endif
amrex::Vector< IBSEBMaterial > read_ibseb_materials(const std::string &file)
Definition: ERF_IBSEBMaterials.cpp:25
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_IBSEBMaterials.H:24
amrex::Real albedo
Definition: ERF_IBSEBMaterials.H:26
amrex::Real k_therm
[W/m/K]
Definition: ERF_IBSEBMaterials.H:28
char name[64]
Definition: ERF_IBSEBMaterials.H:31
amrex::Real thickness
[m]
Definition: ERF_IBSEBMaterials.H:30
int mat_id
Definition: ERF_IBSEBMaterials.H:25
amrex::Real rho_cp
[J/m3/K]
Definition: ERF_IBSEBMaterials.H:29
amrex::Real emissivity
Definition: ERF_IBSEBMaterials.H:27