ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_IBSEBBalance.H File Reference

Newton solve of the surface energy balance on one building face. More...

#include <AMReX_REAL.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_Math.H>
#include <cmath>
Include dependency graph for ERF_IBSEBBalance.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ibseb
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real ibseb::solve_skin_balance (amrex::Real T_start, amrex::Real SW_abs, amrex::Real Q_abs, amrex::Real LW_ext, amrex::Real emis, amrex::Real f_bldg, amrex::Real C_H, amrex::Real exner, amrex::Real theta_air, amrex::Real LE, amrex::Real slab_a, amrex::Real slab_b, amrex::Real T_min, amrex::Real T_max, amrex::Real max_step, amrex::Real tol, int max_iter, int &n_iter, amrex::Real &resid)
 

Variables

constexpr amrex::Real ibseb::SIGMA_SB = 5.670374419e-8
 Stefan-Boltzmann constant [W/m2/K4]. More...
 

Detailed Description

Newton solve of the surface energy balance on one building face.

Adapted from the ERF-SLUCM branch's ERF_UCMSEBSolver.H (solve_facet_seb). The face skin is massless, so at the end of every atmospheric step its temperature :math:T_s satisfies

\[ F(T_s) = SW_{abs} + \epsilon\,Q_{ext} + \epsilon\,[LW_{ext} - (1 - f_b)\,\sigma T_s^4] - C_H\,(T_s/\Pi - \theta_a) - LE - (a\,T_s - b) = 0 , \]

where every term keeps the sign convention of the module (radiation into the face positive, H, LE and G out of it positive):

  • SW_abs is the absorbed shortwave of the step;
  • Q_ext is an external incident flux (a fire's radiation), absorbed with the face's longwave emissivity by Kirchhoff's law since such sources are thermal; zero unless something sets it;
  • LW_ext is the incoming longwave from the sky and the ground; the part reflected back by the surrounding walls is f_b sigma T_s^4 (isothermal surroundings) and folds into the emission term as the factor (1 - f_b);
  • C_H (T_s / Pi - theta_a) is the wall function's sensible flux with the coefficient C_H = rho c_p kappa u* / ln(delta/z0h) frozen at its value from the wind of the step, Pi the Exner function of the fluid cell so the skin temperature enters as a potential temperature;
  • LE is the latent flux, held at its stored value (zero, not modelled);
  • a T_s - b is the conduction into the slab that the implicit slab step (ERF_IBSEBSlab.H) will produce for a skin temperature T_s (ibseb::slab_skin_response()), so the balance and the slab agree exactly instead of lagging the slab's top layer by one step.

Newton's method with the analytic Jacobian F' = -4 eps (1 - f_b) sigma T_s^3 - C_H / Pi - a (every term negative, so the iteration is monotone), a step cap and bounds on the temperature. The bounds are inputs (erf.ibseb.T_skin_min / T_skin_max) because a face under a fire's radiation legitimately exceeds the 380 K of the urban canopy model; a face pinned at a bound leaves a non-zero residual, which the caller stores and the summary counts.