Function declarations (used globally) from RADIATION parts of code. More...
Go to the source code of this file.
Functions | |
void | mhdfull_calc_rad (FTYPE *pr, struct of_geom *ptrgeom, struct of_state *q, FTYPE(*radstressdir)[NDIM]) |
void | mhd_calc_rad (FTYPE *pr, int dir, struct of_geom *geom, struct of_state *q, FTYPE *radstressdir, FTYPE *radstressdirabs) |
compute radiation stres-energy tensor assuming M1 closure More... | |
FTYPE | my_min (FTYPE a, FTYPE b) |
FTYPE | my_sign (FTYPE x) |
int | calc_Rij (FTYPE *pp, FTYPE Rij[][4]) |
void | koral_source_rad_calc (int computestate, int computeentropy, FTYPE *pr, struct of_geom *ptrgeom, FTYPE *Gdpl, FTYPE *Gdabspl, FTYPE *chi, FTYPE *Tgas, FTYPE *Trad, struct of_state *q) |
get 4-force for all pl's More... | |
int | calc_rad_lambda (FTYPE *pp, struct of_geom *ptrgeom, struct of_state *q, FTYPE Tgas, FTYPE *lambda, FTYPE *nlambda, FTYPE *kappaemit, FTYPE *kappanemit) |
void | calc_Tandopacityandemission (FTYPE *pr, struct of_geom *ptrgeom, struct of_state *q, FTYPE Ruu, FTYPE gammaradgas, FTYPE B, FTYPE *Tgas, FTYPE *Tradff, FTYPE *nradff, FTYPE *expfactorff, FTYPE *kappa, FTYPE *kappan, FTYPE *kappaemit, FTYPE *kappanemit, FTYPE *kappaes, FTYPE *lambda, FTYPE *nlambda) |
get {abs} and {es} in /mass * rho = 1/cm form. More... | |
int | prad_fforlab (int *whichvel, int *whichcoord, int whichdir, int i, int j, int k, int loc, struct of_geom *ptrgeom, FTYPE *pradffortho, FTYPE *pin, FTYPE *pout) |
radiative ortonormal ff primitives (E,F^i) <-> primitives in lab frame Used only for initial conditions whichvel: input vel type for U1-U3 whichcoord: input coord type for both U1-U3 and URAD1-URAD3 whichdir: LAB2FF or FF2LAB . More... | |
int | prad_labtoff (int *whichvel, int *whichcoord, int i, int j, int k, int loc, struct of_geom *ptrgeom, FTYPE *pradffortho, FTYPE *pin, FTYPE *pout) |
like prad_fforlab() but for only whichdir=LAB2FF used for dumps or diags More... | |
int | prad_fftolab (int *whichvel, int *whichcoord, int i, int j, int k, int loc, struct of_geom *ptrgeom, FTYPE *pradffortho, FTYPE *pin, FTYPE *pout) |
like prad_fforlab() but for only whichdir=FF2LAB used for IC More... | |
int | whichfluid_ffrad_to_primeall (int *whichvel, int *whichcoordfluid, int *whichcoordrad, struct of_geom *ptrgeomprimecoords, FTYPE *pradffortho, FTYPE *pin, FTYPE *pout) |
Input: start with pin [with fluid in whichvel velocity and whichcoordfluid coordinates (PRIMECOORDS or MCOORD) and radiation as E,F in fluid frame orthonormal basis in whichcoordrad coordinates] Output: pout [with all WHICHVEL PRIMECOORDS and radiation using velocity primitive]. More... | |
int | primefluid_EVrad_to_primeall (int *whichvel, int *whichcoord, struct of_geom *ptrgeom, FTYPE *pin, FTYPE *pout) |
for BCs, to take E[radiation frame] and u^i as radiation primitives in whichvel/whichcoord obtains WHICHVEL/PRIMECOORD primitives More... | |
int | u2p_rad (int showmessages, int allowlocalfailurefixandnoreport, FTYPE gammamaxrad, int whichcap, FTYPE *uu, FTYPE *pp, struct of_geom *ptrgeom, PFTYPE *lpflag, PFTYPE *lpflagrad) |
int | get_state_uradconuradcovonly (FTYPE *pr, struct of_geom *ptrgeom, struct of_state *q) |
Get only u^ and u_ assumine b^ and b_ not used. More... | |
int | vchar_rad (FTYPE *pr, struct of_state *q, int dir, struct of_geom *geom, FTYPE *cmax, FTYPE *cmin, FTYPE *cmax2, FTYPE *cmin2, int *ignorecourant) |
compute radiative characteristics as limited by opacity More... | |
int | kappa_func_fits_all (FTYPE rho, FTYPE B, FTYPE Tg, FTYPE Tr, FTYPE varexpf, FTYPE *kappa, FTYPE *kappaemit, FTYPE *kappan, FTYPE *kappanemit, FTYPE *kappaes) |
int | calcfull_tautot (FTYPE *pp, struct of_geom *ptrgeom, FTYPE *tautot, FTYPE *tautotmax) |
int | calc_tautot (FTYPE *pp, struct of_geom *ptrgeom, struct of_state *q, FTYPE *tautot, FTYPE *tautotmax) |
calculates total opacity over dx[] More... | |
FTYPE | calc_LTE_NfromT (FTYPE T) |
nrad(T) = nrad=arad T^3/2.70118 (this is LTE only if put in T was gas T) More... | |
FTYPE | calc_LTE_NfromE (FTYPE E) |
nrad(E) More... | |
FTYPE | calc_LTE_EfromT (FTYPE) |
E=urad=arad T^4 (this is LTE only if put in T was gas T) More... | |
FTYPE | calc_LTE_TfromE (FTYPE) |
E=urad=arad T^4 and just solve for T (this is LTE only if assume resulting T is gas T). If put in fluid-frame E, then correct T for radiation in fluid frame. More... | |
FTYPE | calc_LTE_Efromurho (FTYPE E, FTYPE) |
This will really give back only LTE E. More... | |
FTYPE | calc_PEQ_ufromTrho (FTYPE, FTYPE) |
suplementary routines for conversions More... | |
FTYPE | calc_PEQ_Tfromurho (FTYPE, FTYPE) |
int | set_ncon_velocity (int whichvel, FTYPE gammamax, FTYPE *ncon, struct of_geom *ptrgeom, FTYPE *uconwhichvel) |
set velocity based upon ncon and gammamax and return in whichvel format for the ptrgeom geometry/coords More... | |
Function declarations (used globally) from RADIATION parts of code.
Definition in file global.funcdeclare.rad.h.
E=urad=arad T^4 (this is LTE only if put in T was gas T)
Definition at line 14181 of file phys.tools.rad.c.
This will really give back only LTE E.
Definition at line 14208 of file phys.tools.rad.c.
nrad(E)
Definition at line 14194 of file phys.tools.rad.c.
nrad(T) = nrad=arad T^3/2.70118 (this is LTE only if put in T was gas T)
Definition at line 14188 of file phys.tools.rad.c.
E=urad=arad T^4 and just solve for T (this is LTE only if assume resulting T is gas T). If put in fluid-frame E, then correct T for radiation in fluid frame.
Definition at line 14201 of file phys.tools.rad.c.
suplementary routines for conversions
Definition at line 14166 of file phys.tools.rad.c.
int calc_rad_lambda | ( | FTYPE * | pp, |
struct of_geom * | ptrgeom, | ||
struct of_state * | q, | ||
FTYPE | Tgas, | ||
FTYPE * | lambda, | ||
FTYPE * | nlambda, | ||
FTYPE * | kappaemit, | ||
FTYPE * | kappanemit | ||
) |
void calc_Tandopacityandemission | ( | FTYPE * | pr, |
struct of_geom * | ptrgeom, | ||
struct of_state * | q, | ||
FTYPE | Ruu, | ||
FTYPE | gammaradgas, | ||
FTYPE | B, | ||
FTYPE * | Tgas, | ||
FTYPE * | Tradff, | ||
FTYPE * | nradff, | ||
FTYPE * | expfactorradff, | ||
FTYPE * | kappa, | ||
FTYPE * | kappan, | ||
FTYPE * | kappaemit, | ||
FTYPE * | kappanemit, | ||
FTYPE * | kappaes, | ||
FTYPE * | lambda, | ||
FTYPE * | nlambda | ||
) |
get {abs} and {es} in /mass * rho = 1/cm form.
energy density loss rate integrated over frequency and solid angle
Definition at line 10442 of file phys.tools.rad.c.
int calc_tautot | ( | FTYPE * | pp, |
struct of_geom * | ptrgeom, | ||
struct of_state * | q, | ||
FTYPE * | tautot, | ||
FTYPE * | tautotmax | ||
) |
calculates total opacity over dx[]
Definition at line 14147 of file phys.tools.rad.c.
Definition at line 14136 of file phys.tools.rad.c.
Get only u^ and u_ assumine b^ and b_ not used.
Definition at line 11096 of file phys.tools.rad.c.
void koral_source_rad_calc | ( | int | computestate, |
int | computeentropy, | ||
FTYPE * | pr, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | Gdpl, | ||
FTYPE * | Gdabspl, | ||
FTYPE * | chi, | ||
FTYPE * | Tgas, | ||
FTYPE * | Trad, | ||
struct of_state * | q | ||
) |
get 4-force for all pl's
Definition at line 10568 of file phys.tools.rad.c.
void mhd_calc_rad | ( | FTYPE * | pr, |
int | dir, | ||
struct of_geom * | geom, | ||
struct of_state * | q, | ||
FTYPE * | radstressdir, | ||
FTYPE * | radstressdirabs | ||
) |
compute radiation stres-energy tensor assuming M1 closure
Definition at line 11124 of file phys.tools.rad.c.
void mhdfull_calc_rad | ( | FTYPE * | pr, |
struct of_geom * | ptrgeom, | ||
struct of_state * | q, | ||
FTYPE(*) | radstressdir[NDIM] | ||
) |
Definition at line 11111 of file phys.tools.rad.c.
Definition at line 11239 of file phys.tools.rad.c.
Definition at line 11245 of file phys.tools.rad.c.
int prad_fforlab | ( | int * | whichvel, |
int * | whichcoord, | ||
int | whichdir, | ||
int | i, | ||
int | j, | ||
int | k, | ||
int | loc, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | pradffortho, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
radiative ortonormal ff primitives (E,F^i) <-> primitives in lab frame Used only for initial conditions whichvel: input vel type for U1-U3 whichcoord: input coord type for both U1-U3 and URAD1-URAD3 whichdir: LAB2FF or FF2LAB .
In addition, here lab means HARM-lab different by alpha factor from true lab. i,j,k,loc = standard grid location ptrgeom: any input geometry for the lab frame (ptrgeom could be from MCOORD, PRIMECOORDS, etc.) (same for pin's velocity as well as orthonormal basis) If ptrgeom==NULL, then use i,j,k,loc to get geometry in whichcoord coordinates pradffortho: radiation primitives (PRAD0-3) should be fluid-frame orthonormal basis values (i.e. E,F in fluid frame orthonormal basis) pin: inputs for primitives (i.e. whichvel for U1-U3 and whichcoord for U1-U3,URAD1-URAD3) pout: outputs for primitives ("")
Definition at line 11432 of file phys.tools.rad.c.
int prad_fftolab | ( | int * | whichvel, |
int * | whichcoord, | ||
int | i, | ||
int | j, | ||
int | k, | ||
int | loc, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | pradffortho, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
like prad_fforlab() but for only whichdir=FF2LAB used for IC
Definition at line 11526 of file phys.tools.rad.c.
int prad_labtoff | ( | int * | whichvel, |
int * | whichcoord, | ||
int | i, | ||
int | j, | ||
int | k, | ||
int | loc, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | pradffortho, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
like prad_fforlab() but for only whichdir=LAB2FF used for dumps or diags
Definition at line 11448 of file phys.tools.rad.c.
int primefluid_EVrad_to_primeall | ( | int * | whichvel, |
int * | whichcoord, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
for BCs, to take E[radiation frame] and u^i as radiation primitives in whichvel/whichcoord obtains WHICHVEL/PRIMECOORD primitives
Definition at line 11684 of file phys.tools.rad.c.
int set_ncon_velocity | ( | int | whichvel, |
FTYPE | gammamax, | ||
FTYPE * | ncon, | ||
struct of_geom * | ptrgeom, | ||
FTYPE * | uconwhichvel | ||
) |
set velocity based upon ncon and gammamax and return in whichvel format for the ptrgeom geometry/coords
Definition at line 14217 of file phys.tools.rad.c.
int u2p_rad | ( | int | showmessages, |
int | allowlocalfailurefixandnoreport, | ||
FTYPE | gammamaxrad, | ||
int | whichcap, | ||
FTYPE * | uu, | ||
FTYPE * | pp, | ||
struct of_geom * | ptrgeom, | ||
PFTYPE * | lpflag, | ||
PFTYPE * | lpflagrad | ||
) |
Definition at line 11984 of file phys.tools.rad.c.
int vchar_rad | ( | FTYPE * | pr, |
struct of_state * | q, | ||
int | dir, | ||
struct of_geom * | geom, | ||
FTYPE * | cmax, | ||
FTYPE * | cmin, | ||
FTYPE * | cmax2, | ||
FTYPE * | cmin2, | ||
int * | ignorecourant | ||
) |
compute radiative characteristics as limited by opacity
Definition at line 10975 of file phys.tools.rad.c.
int whichfluid_ffrad_to_primeall | ( | int * | whichvel, |
int * | whichcoordfluid, | ||
int * | whichcoordrad, | ||
struct of_geom * | ptrgeomprimecoords, | ||
FTYPE * | pradffortho, | ||
FTYPE * | pin, | ||
FTYPE * | pout | ||
) |
Input: start with pin [with fluid in whichvel velocity and whichcoordfluid coordinates (PRIMECOORDS or MCOORD) and radiation as E,F in fluid frame orthonormal basis in whichcoordrad coordinates] Output: pout [with all WHICHVEL PRIMECOORDS and radiation using velocity primitive].
Useful for BCs when have (say) VEL3,MCOORD for fluid velocity as well as E,F in ff for radiation and need normal WHICHVEL PRIMECOORDS fluid velocity as well as normal velocity primitive for radiation
Definition at line 11729 of file phys.tools.rad.c.