forked from bendudson/hermes-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecycling.hxx
35 lines (26 loc) · 943 Bytes
/
recycling.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Pseudo-recycling with Nn exponential approximation
*/
#ifndef __NEUTRAL_RECYCLING_H__
#define __NEUTRAL_RECYCLING_H__
#include "neutral-model.hxx"
class NeutralRecycling : public NeutralModel {
public:
NeutralRecycling(Solver *solver, Mesh *mesh, Options &options);
~NeutralRecycling() {}
/// Update plasma quantities
void update(const Field3D &Ne, const Field3D &Te, const Field3D &Ti,
const Field3D &Vi);
private:
Field3D Nn, Tn;
Field3D Nn0; // scaling for neutral density approximation
Field3D lambda_int, lambda; // for mean free path calculation
BoutReal Lmax; // Maximum mean free path [m]
BoutReal frecycle; // Recycling fraction
Field2D hthe;
// Utility functions
Field2D CumSumY2D(const Field2D &f, bool reverse);
Field3D CumSumY3D(const Field3D &f, bool reverse);
BoutReal bcast_lasty(const BoutReal f);
};
#endif // __NEUTRAL_MODEL_H__