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

Missing diffusive fluxes in FOFC #392

Open
jmstone opened this issue Jan 20, 2023 · 3 comments
Open

Missing diffusive fluxes in FOFC #392

jmstone opened this issue Jan 20, 2023 · 3 comments

Comments

@jmstone
Copy link
Collaborator

jmstone commented Jan 20, 2023

In GitLab by @changgoo1 on Jan 20, 2023, 09:43

In Hydro::FOFC and MHD::FOFC, the fluxes of a cell that hits floors are replaced. When diffusion processes are turned on, the original fluxes include the fluxes from the diffusion processes. So, this has to be added back for consistency.

@jmstone
Copy link
Collaborator Author

jmstone commented Jan 20, 2023

In GitLab by @changgoo1 on Jan 20, 2023, 09:51

In Athena++, it was pretty straightforward as it keeps diffusive fluxes in separate arrays. It seems that this is not the case here. I feel that creating inline functions for single state diffusive fluxes may be one way to solve this.

@jmstone
Copy link
Collaborator Author

jmstone commented Jan 20, 2023

In GitLab by @pdmullen on Jan 20, 2023, 10:01

Nice catch! What if we moved

  // Add viscous, resistive, heat-flux, etc fluxes
  if (pvisc != nullptr) {
    pvisc->IsotropicViscousFlux(w0, pvisc->nu, peos->eos_data, uflx);
  }
  if ((presist != nullptr) && (peos->eos_data.is_ideal)) {
    presist->OhmicEnergyFlux(b0, uflx);
  }
  if (pcond != nullptr) {
    pcond->AddHeatFlux(w0, peos->eos_data, uflx);
  }

to after the FOFC call? If we elected for this option, then diffusive fluxes would not inform the FOFC prediction (only the standard non-diffusive fluxes would). As a point of comparison: in GRMHD, we do not include coordinate source terms in the prediction of whether a cell will be floored or not.

@jmstone
Copy link
Collaborator Author

jmstone commented Jan 20, 2023

In GitLab by @changgoo1 on Jan 20, 2023, 10:05

Yes, that can be an option. The current FOFC prediction is anyway not the perfect prediction as it misses a few source terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant