Skip to content

Commit

Permalink
Address BWO review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Sep 10, 2024
1 parent 043a028 commit 4e41e6d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
20 changes: 10 additions & 10 deletions docs/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,24 @@ conserved to primitive conversion if both are defined.
Diffusive processes in AthenaPK can be configured in the `<diffusion>` block of the input file.
```
<diffusion>
integrator = unsplit # alternatively: rkl2
#rkl2_max_dt_ratio = 100.0 # limits the ratio between the parabolic and hyperbolic timesteps
#cfl = 1.0 # Additional safety factor applied to diffusive timestep constraint. Default to hyperbolic cfl.
integrator = unsplit # alternatively: rkl2 (for rkl2 integrator (operator split integrator)
#rkl2_max_dt_ratio = 100.0 # limits the ratio between the parabolic and hyperbolic timesteps (only used for RKL2 operator split integrator)
#cfl = 1.0 # Additional safety factor applied in the caluclation of the diffusive timestep (used in both unsplit and RKL2 integration schemes). Defaults to hyperbolic cfl.
conduction = anisotropic # none (disabled), or isotropic, or anisotropic
conduction_coeff = fixed # alternative: spitzer
thermal_diff_coeff_code = 0.01 # fixed coefficent in code units
thermal_diff_coeff_code = 0.01 # fixed coefficent in code units (code_length^2/code_time)
#spitzer_cond_in_erg_by_s_K_cm = 4.6e7 # spitzer coefficient in cgs units (requires definition of a unit system)
#conduction_sat_phi = 0.3 # fudge factor to account for uncertainties in saturated fluxes
viscosity = none # none (disabled) or isotropic
viscosity_coeff = fixed
mom_diff_coeff_code = 0.25 # fixed coefficent in code units
mom_diff_coeff_code = 0.25 # fixed coefficent of the kinetmatic viscosity in code units (code_length^2/code_time)
resistivity = none # none (disabled) or ohmic
resistivity_coeff = fixed
ohm_diff_coeff_code = 0.25 # fixed coefficent in code units
ohm_diff_coeff_code = 0.25 # fixed coefficent of the magnetic (ohmic) diffusivity code units (code_length^2/code_time)
```
(An)isotropic thermal conduction (with fixed or Spitzer coefficient), and isotropic viscosity and
resistivity with fixed coefficient are currently implemented.
Expand Down Expand Up @@ -199,23 +199,23 @@ Default value corresponds to the typical value used in literature and goes back
#### Viscosity/Momentum diffusion

Only isotropic viscosity with a (spatially and temporally) fixed coefficient in code units
is currently implemented.
(`code_length`^2/`code_time`) is currently implemented.
To enable set (in the `<diffusion>` block)
```
viscosity = isotropic
viscosity_coeff = fixed
mom_diff_coeff_code = 0.25 # fixed coefficent in code units
mom_diff_coeff_code = 0.25 # fixed coefficent of the kinetmatic viscosity in code units (code_length^2/code_time)
```

#### Resistivity/Ohmic diffusion

Only resistivity with a (spatially and temporally) fixed coefficient in code units
is currently implemented.
(`code_length`^2/`code_time`)is currently implemented.
To enable set (in the `<diffusion>` block)
```
resistivity = ohmic
resistivity_coeff = fixed
ohm_diff_coeff_code = 0.25 # fixed coefficent in code units
ohm_diff_coeff_code = 0.25 # fixed coefficent of the magnetic (ohmic) diffusivity code units (code_length^2/code_time)
```


Expand Down
2 changes: 1 addition & 1 deletion inputs/diffusion.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AthenaPK - a performance portable block structured AMR MHD code
# Copyright (c) 2021-2023, Athena Parthenon Collaboration. All rights reserved.
# Copyright (c) 2021-2024, Athena Parthenon Collaboration. All rights reserved.
# Licensed under the BSD 3-Clause License (the "LICENSE");

<comment>
Expand Down
3 changes: 1 addition & 2 deletions src/hydro/diffusion/resistivity.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//========================================================================================
// AthenaPK - a performance portable block structured AMR astrophysical MHD code.
// Copyright (c) 2023, Athena-Parthenon Collaboration. All rights reserved.
// Copyright (c) 2024, Athena-Parthenon Collaboration. All rights reserved.
// Licensed under the 3-clause BSD License, see LICENSE file for details
//========================================================================================
//! \file resistivity.cpp
Expand Down Expand Up @@ -49,7 +49,6 @@ Real EstimateResistivityTimestep(MeshData<Real> *md) {
fac = 1.0 / 6.0;
}

const auto gm1 = hydro_pkg->Param<Real>("AdiabaticIndex");
const auto &ohm_diff = hydro_pkg->Param<OhmicDiffusivity>("ohm_diff");

if (ohm_diff.GetType() == Resistivity::ohmic &&
Expand Down
2 changes: 1 addition & 1 deletion src/hydro/diffusion/viscosity.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//========================================================================================
// AthenaPK - a performance portable block structured AMR astrophysical MHD code.
// Copyright (c) 2021-2023, Athena-Parthenon Collaboration. All rights reserved.
// Copyright (c) 2021-2024, Athena-Parthenon Collaboration. All rights reserved.
// Licensed under the 3-clause BSD License, see LICENSE file for details
//========================================================================================
// AthenaXXX astrophysical plasma code
Expand Down
2 changes: 1 addition & 1 deletion src/pgen/diffusion.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// AthenaPK - a performance portable block structured AMR MHD code
// Copyright (c) 2021-2023, Athena Parthenon Collaboration. All rights reserved.
// Copyright (c) 2021-2024, Athena Parthenon Collaboration. All rights reserved.
// Licensed under the 3-Clause License (the "LICENSE")

// Parthenon headers
Expand Down
2 changes: 1 addition & 1 deletion tst/regression/test_suites/diffusion/diffusion.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ========================================================================================
# AthenaPK - a performance portable block structured AMR MHD code
# Copyright (c) 2023, Athena Parthenon Collaboration. All rights reserved.
# Copyright (c) 2023-2024, Athena Parthenon Collaboration. All rights reserved.
# Licensed under the 3-clause BSD License, see LICENSE file for details
# ========================================================================================

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ========================================================================================
# AthenaPK - a performance portable block structured AMR MHD code
# Copyright (c) 2023, Athena Parthenon Collaboration. All rights reserved.
# Copyright (c) 2023-2024, Athena Parthenon Collaboration. All rights reserved.
# Licensed under the 3-clause BSD License, see LICENSE file for details
# ========================================================================================

Expand Down

0 comments on commit 4e41e6d

Please sign in to comment.