HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
sources.c File Reference

Source physics and source geometry coordinate factors. More...

#include "decs.h"
Include dependency graph for sources.c:

Go to the source code of this file.

Macros

#define THETACOOL   (h_over_r) /* should be same as h_over_r */
 
#define TAUCOOL   (1.0) /* cooling time in number of rotational times : really TAUCOOL=2*M_PI would be 1 rotational time */
 
#define NOCOOLTHETAFACT   (3.0) /* this times h_over_r and no more cooling there*/
 
#define COOLTAPER1(th)   (exp(-pow((th)-M_PI*0.5,2.0)/(2.0*pow(nocoolthetafactor*h_over_r,2.0))))
 
#define SLOPE2   (1.0/(M_PI*0.5-nocoolthetafactor*h_over_r))
 
#define COOLTAPER2(th)   (((th)<M_PI*0.5-nocoolthetafactor*h_over_r) ? (SLOPE2*(th)) : ( ((th)>M_PI*0.5+nocoolthetafactor*h_over_r) ? (-SLOPE2*((th)-M_PI)) : 1.0 ) )
 
#define SLOPE3   (1.0/(nocoolthetafactor*h_over_r))
 
#define WIDTHTAPER   (nocoolthetafactor*h_over_r)
 
#define TAPERPOS1   (M_PI*0.5-nocoolthetafactor*h_over_r-WIDTHTAPER)
 
#define TAPERPOS2   (M_PI*0.5-nocoolthetafactor*h_over_r)
 
#define TAPERPOS3   (M_PI*0.5+nocoolthetafactor*h_over_r)
 
#define TAPERPOS4   (M_PI*0.5+nocoolthetafactor*h_over_r+WIDTHTAPER)
 
#define TAPERFUN1(th)   (0.0)
 
#define TAPERFUN2(th)   (SLOPE3*((th)-TAPERPOS1))
 
#define TAPERFUN3(th)   (1.0)
 
#define TAPERFUN4(th)   (-SLOPE3*((th)-TAPERPOS4))
 
#define TAPERFUN5(th)   (0.0)
 
#define COOLTAPER3(th)   (((th)<TAPERPOS1 ? TAPERFUN1(th) : ( ((th)<TAPERPOS2) ? TAPERFUN2(th) : ( ((th)<TAPERPOS3) ? TAPERFUN3(th): ( ((th)<TAPERPOS4) ? TAPERFUN4(th) : TAPERFUN5(th) )))) )
 
#define REBECCATHETACOOL   (h_over_r) /* should be same as h_over_r */
 
#define REBECCATAUCOOL   (2.0*M_PI) /* cooling time in number of rotational times : really REBECCATAUCOOL=2*M_PI would be 1 rotational time */
 
#define REBECCANOCOOLTHETAFACT   (1.0) /* this times h_over_r and no more cooling there*/
 
#define TRELAX   0.05
 

Functions

int sourcephysics (FTYPE *pi, FTYPE *pr, FTYPE *pf, int *didreturnpf, int *eomtype, struct of_geom *ptrgeom, struct of_state *q, FTYPE *Ugeomfreei, FTYPE *Ugeomfreef, FTYPE *CUf, FTYPE *CUimp, FTYPE dissmeasure, FTYPE *dUother, FTYPE(*dUcomp)[NPR])
 Ugeomfree and dUother are in UNOTHING form (or UEVOLVE without geometry) pf might be modified so better approximation to final update, so easier on Utoprimgen() to get inversion. More...
 
void misc_source (FTYPE *pr, struct of_geom *geom, struct of_state *q, FTYPE *dU, FTYPE Dt)
 

Detailed Description

Source physics and source geometry coordinate factors.

Definition in file sources.c.

Macro Definition Documentation

#define COOLTAPER1 (   th)    (exp(-pow((th)-M_PI*0.5,2.0)/(2.0*pow(nocoolthetafactor*h_over_r,2.0))))

Definition at line 72 of file sources.c.

#define COOLTAPER2 (   th)    (((th)<M_PI*0.5-nocoolthetafactor*h_over_r) ? (SLOPE2*(th)) : ( ((th)>M_PI*0.5+nocoolthetafactor*h_over_r) ? (-SLOPE2*((th)-M_PI)) : 1.0 ) )

Definition at line 74 of file sources.c.

#define COOLTAPER3 (   th)    (((th)<TAPERPOS1 ? TAPERFUN1(th) : ( ((th)<TAPERPOS2) ? TAPERFUN2(th) : ( ((th)<TAPERPOS3) ? TAPERFUN3(th): ( ((th)<TAPERPOS4) ? TAPERFUN4(th) : TAPERFUN5(th) )))) )

Definition at line 86 of file sources.c.

#define NOCOOLTHETAFACT   (3.0) /* this times h_over_r and no more cooling there*/

Definition at line 71 of file sources.c.

#define REBECCANOCOOLTHETAFACT   (1.0) /* this times h_over_r and no more cooling there*/

Definition at line 165 of file sources.c.

#define REBECCATAUCOOL   (2.0*M_PI) /* cooling time in number of rotational times : really REBECCATAUCOOL=2*M_PI would be 1 rotational time */

Definition at line 164 of file sources.c.

#define REBECCATHETACOOL   (h_over_r) /* should be same as h_over_r */

Definition at line 163 of file sources.c.

#define SLOPE2   (1.0/(M_PI*0.5-nocoolthetafactor*h_over_r))

Definition at line 73 of file sources.c.

#define SLOPE3   (1.0/(nocoolthetafactor*h_over_r))

Definition at line 75 of file sources.c.

#define TAPERFUN1 (   th)    (0.0)

Definition at line 81 of file sources.c.

#define TAPERFUN2 (   th)    (SLOPE3*((th)-TAPERPOS1))

Definition at line 82 of file sources.c.

#define TAPERFUN3 (   th)    (1.0)

Definition at line 83 of file sources.c.

#define TAPERFUN4 (   th)    (-SLOPE3*((th)-TAPERPOS4))

Definition at line 84 of file sources.c.

#define TAPERFUN5 (   th)    (0.0)

Definition at line 85 of file sources.c.

#define TAPERPOS1   (M_PI*0.5-nocoolthetafactor*h_over_r-WIDTHTAPER)

Definition at line 77 of file sources.c.

#define TAPERPOS2   (M_PI*0.5-nocoolthetafactor*h_over_r)

Definition at line 78 of file sources.c.

#define TAPERPOS3   (M_PI*0.5+nocoolthetafactor*h_over_r)

Definition at line 79 of file sources.c.

#define TAPERPOS4   (M_PI*0.5+nocoolthetafactor*h_over_r+WIDTHTAPER)

Definition at line 80 of file sources.c.

#define TAUCOOL   (1.0) /* cooling time in number of rotational times : really TAUCOOL=2*M_PI would be 1 rotational time */

Definition at line 70 of file sources.c.

#define THETACOOL   (h_over_r) /* should be same as h_over_r */

Definition at line 69 of file sources.c.

#define TRELAX   0.05

Definition at line 601 of file sources.c.

#define WIDTHTAPER   (nocoolthetafactor*h_over_r)

Definition at line 76 of file sources.c.

Function Documentation

void misc_source ( FTYPE pr,
struct of_geom geom,
struct of_state q,
FTYPE dU,
FTYPE  Dt 
)

Definition at line 603 of file sources.c.

int sourcephysics ( FTYPE pi,
FTYPE pr,
FTYPE pf,
int *  didreturnpf,
int *  eomtype,
struct of_geom ptrgeom,
struct of_state q,
FTYPE Ugeomfreei,
FTYPE Ugeomfreef,
FTYPE CUf,
FTYPE CUimp,
FTYPE  dissmeasure,
FTYPE dUother,
FTYPE(*)  dUcomp[NPR] 
)

Ugeomfree and dUother are in UNOTHING form (or UEVOLVE without geometry) pf might be modified so better approximation to final update, so easier on Utoprimgen() to get inversion.

Definition at line 14 of file sources.c.

Here is the call graph for this function:

Here is the caller graph for this function: