Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions model/iharm/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ static double Mdot_dump;
static double MdotEdd_dump;
static double Ladv_dump;

//ARR: positron to electron ratio
double positronRatio = 0.0;

// MAYBES
//static double t0;

Expand Down Expand Up @@ -99,6 +102,9 @@ void try_set_model_parameter(const char *word, const char *value)
set_by_word_val(word, value, "dump", (void *)fnam, TYPE_STR);
set_by_word_val(word, value, "counterjet", &counterjet, TYPE_INT);

//ARR: positron to electron ratio
set_by_word_val(word, value, "positronRatio", &positronRatio, TYPE_DBL);

set_by_word_val(word, value, "tp_over_te", &tp_over_te, TYPE_DBL);
set_by_word_val(word, value, "trat_small", &trat_small, TYPE_DBL);
set_by_word_val(word, value, "trat_large", &trat_large, TYPE_DBL);
Expand Down
1 change: 1 addition & 0 deletions model/iharm/model_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
extern double DTd;
extern double sigma_cut;
extern int counterjet;
extern double positronRatio;
extern double rmax_geo;

#endif // MODEL_PARAMS_H
13 changes: 13 additions & 0 deletions src/ipolarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ void evolve_N(double Xi[NDIM], double Kconi[NDIM],
}
}

//ARR: Modify according to positron ratio
jI *= (1 + positronRatio);
jQ *= (1 + positronRatio);
jU *= (1 + positronRatio);
jV *= (1 - positronRatio);
aI *= (1 + positronRatio);
aQ *= (1 + positronRatio);
aU *= (1 + positronRatio);
aV *= (1 - positronRatio);
rQ *= (1 + positronRatio);
rU *= (1 + positronRatio);
rV *= (1 - positronRatio);

/* make plasma tetrad */
B = get_model_b(Xf); /* field in G */
if (B < 0.) {
Expand Down
1 change: 1 addition & 0 deletions src/par.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void load_par_from_argv(int argc, char *argv[], Params *params) {
params->trace_stride = 1;
params->trace_i = -1;
params->trace_j = -1;

// This is what the par infra does.
// I'm not sure there's still any advantage to "const" if we do this,
// but hey, no warnings
Expand Down
2 changes: 2 additions & 0 deletions src/par.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ typedef struct params_t {
int quench_output; // Quench output, i.e. "quench" argument
int only_unpolarized; // Unpolarized transport only

double positronRatio; //Ratio of positrons to electrons.

const char dump[STRLEN];
const char outf[STRLEN];

Expand Down