Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C) Chained limiters, edge flux, other changes #181

Closed
wants to merge 17 commits into from
Closed
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
7 changes: 4 additions & 3 deletions hermes-3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,13 @@ int Hermes::init(bool restarting) {
return 0;
}

int Hermes::rhs(BoutReal time) {
int Hermes::rhs(BoutReal time, bool linear) {
// Need to reset the state, since fields may be modified in transform steps
state = Options();

set(state["time"], time);
state["units"] = units;
state["units"] = units;
set(state["solver"]["linear"], linear);

// Call all the components
scheduler->transform(state);
Expand Down
2 changes: 1 addition & 1 deletion hermes-3.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public:
virtual ~Hermes() {}
protected:
int init(bool restarting) override;
int rhs(BoutReal t) override;
int rhs(BoutReal t, bool linear) override;
int precon(BoutReal t, BoutReal gamma, BoutReal delta);

/// Add variables to be written to the output file
Expand Down
18 changes: 16 additions & 2 deletions include/neutral_mixed.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ private:

Field3D Dnn; ///< Diffusion coefficient
Field3D DnnNn, DnnPn, DnnTn, DnnNVn; ///< Used for operators
Field3D eta_n; ///< Viscosity
Field3D kappa_n; ///< Thermal conductivity

bool sheath_ydown, sheath_yup;

BoutReal nn_floor; ///< Minimum Nn used when dividing NVn by Nn to get Vn.

BoutReal flux_limit; ///< Diffusive flux limit
BoutReal diffusion_limit; ///< Maximum diffusion coefficient
bool flux_limit; ///< Impose flux limiter?
bool particle_flux_limiter, heat_flux_limiter, momentum_flux_limiter; ///< Which limiters to impose
BoutReal maximum_mfp; ///< Maximum mean free path for diffusion. 0.1 by default, -1 is off.
BoutReal flux_limit_alpha;
BoutReal flux_limit_gamma;
Field3D particle_flux_factor; ///< Particle flux scaling factor
Field3D momentum_flux_factor;
Field3D heat_flux_factor;

BoutReal flux_factor_timescale; ///< Timescale over which flux factors vary
BoutReal flux_factor_time {-1.0}; ///< Last time the flux factors were updated
Field3D particle_flux_avg; ///< Moving average flux factor
Field3D momentum_flux_avg; ///< Moving average flux factor
Field3D heat_flux_avg; ///< Moving average flux factor

bool neutral_viscosity; ///< include viscosity?

Expand Down
Loading
Loading