Skip to content
Open
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e061712
merge with the develop branch
shengtai Dec 4, 2024
b191975
add files from gitlab/sli/coagulation branch and merge with develop
shengtai Dec 4, 2024
63e37b9
format fixed in pgen/dust_coagulation.hpp
shengtai Dec 4, 2024
d82919a
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Dec 4, 2024
6ba72b0
fixed omega_k calculation in dust.cpp
shengtai Dec 5, 2024
1beaf24
remove dust_drag
shengtai Dec 5, 2024
a26caad
modification based on merge comments
shengtai Dec 11, 2024
05da651
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Dec 11, 2024
548a9d1
Merge branch 'develop' into sli/dust
shengtai Dec 11, 2024
347ea01
merge with the head version and modify c2p to p2c in dust.cpp
shengtai Dec 11, 2024
11afd99
Merge branch 'sli/dust' of github.com:lanl/artemis into sli/dust
shengtai Dec 11, 2024
9061f6a
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Dec 23, 2024
ecf6de0
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Jan 2, 2025
053f77b
new modification based on units
shengtai Jan 3, 2025
0198b3b
new output file name based on problem_id
shengtai Jan 3, 2025
22cf399
modified coagulation input file for cgs unit
shengtai Feb 4, 2025
dd8b375
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Feb 4, 2025
3a99ba0
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Feb 11, 2025
8e80417
Added CI test for dust coagulation and paml file for coagulation
shengtai Feb 11, 2025
df9baa0
Add 4D par_for_outer to ArtemisUtils.hpp, rewrite coagulation using t…
shengtai Feb 12, 2025
c6f02e5
fixed a typo in CI routine coagulation.py
shengtai Feb 12, 2025
f4866cf
add compress=on to CMakePresets.json
shengtai Feb 25, 2025
55edfc6
add reference data file for coagulation CI test
shengtai Feb 25, 2025
c60e520
fixed a bug in CI routine coagulation.py
shengtai Feb 27, 2025
6fec291
fixed a bug in coagulation.py
shengtai Feb 27, 2025
c22e675
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Feb 27, 2025
7dbe6b6
using develop branch submodule
shengtai Feb 27, 2025
6a7faa7
modified .gitmodules
shengtai Feb 27, 2025
0f99bfb
change the submodules
shengtai Feb 27, 2025
0b53da6
using old commit of parthenon 9b045ae
shengtai Feb 27, 2025
f5f20d1
update submodule to be consistent with develop branch
shengtai Mar 4, 2025
fb760a6
move rho0 factor from units/mass to problem session
shengtai Jun 30, 2025
4dafd75
Merge remote-tracking branch 'origin/develop' into sli/dust
shengtai Jun 30, 2025
d99ae9c
merge with origin/develop
shengtai Jun 30, 2025
6d6393f
rewrite to dust size conversion
shengtai Jun 30, 2025
0626fe5
replace external with develop/external
shengtai Jul 1, 2025
eeabe97
remove old external
shengtai Jul 1, 2025
bad23a3
updated submodules
shengtai Jul 1, 2025
0e1eab0
fixed a bug in coagulation call in dust.cpp and modified exponential …
shengtai Aug 20, 2025
7876d2c
Merge branch 'develop' of github.com:lanl/artemis into sli/dust
shengtai Aug 20, 2025
c132fd1
modified for logr grid
shengtai Aug 21, 2025
94fbecc
Coagulation edits part I
pdmullen Aug 21, 2025
7be00a2
clang-format 18 vs 20
pdmullen Aug 21, 2025
37a096f
Remove trailing commas in CMakePresets.json
pdmullen Aug 21, 2025
e2baac4
Merge remote-tracking branch 'origin/sli/dust' into pdmullen/coag-v2
pdmullen Aug 29, 2025
0a5d72b
Merge pull request #91 from lanl/pdmullen/coag-v2
pdmullen Aug 29, 2025
160197d
Remove coag ncalls and enforce do_gas with coag
pdmullen Sep 9, 2025
7775e7a
Thread gas_params through coagulation
pdmullen Sep 12, 2025
4ee353a
Introduce a KernelParams struct for coagulation
pdmullen Sep 12, 2025
051726c
Update src/dust/coagulation/coagulation.hpp
pdmullen Sep 18, 2025
75f41a7
Update src/dust/coagulation/coagulation.hpp
pdmullen Sep 18, 2025
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ if (NOT TARGET parthenon)
set(PARTHENON_ENABLE_INIT_PACKING ON CACHE BOOL "" FORCE)
set(PARTHENON_LINT_DEFAULT OFF CACHE BOOL "" FORCE)
set(PARTHENON_DISABLE_EXAMPLES ON CACHE BOOL "" FORCE)
set(PARTHENON_DISABLE_HDF5_COMPRESSION "Disable HDF5 compression" ON)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
add_subdirectory(external/parthenon parthenon)
else()
Expand Down
10 changes: 2 additions & 8 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
"CMAKE_BUILD_TYPE": "Debug",
"Kokkos_ENABLE_DEBUG_BOUNDS_CHECK": "ON",
"CMAKE_CXX_COMPILER": "CC",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON"
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include"
}
},
{
Expand All @@ -74,8 +73,7 @@
"CMAKE_MAKE_PROGRAM": "$env{MAKE_PROGRAM}",
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_CXX_COMPILER": "CC",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON"
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include"
}
},
{
Expand All @@ -89,7 +87,6 @@
"ARTEMIS_ENABLE_CUDA": "ON",
"Kokkos_ARCH_AMPERE80": "ON",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON",
"NUM_GPU_DEVICES_PER_NODE": "4"
}
},
Expand All @@ -103,7 +100,6 @@
"ARTEMIS_ENABLE_CUDA": "ON",
"Kokkos_ARCH_AMPERE80": "ON",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON",
"NUM_GPU_DEVICES_PER_NODE": "4"
}
},
Expand All @@ -118,7 +114,6 @@
"ARTEMIS_ENABLE_CUDA": "ON",
"Kokkos_ARCH_HOPPER90": "ON",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON",
"NUM_GPU_DEVICES_PER_NODE": "4"
}
},
Expand All @@ -131,7 +126,6 @@
"CMAKE_CXX_COMPILER": "$env{ARTEMIS_HOME}/external/parthenon/external/Kokkos/bin/nvcc_wrapper",
"ARTEMIS_ENABLE_CUDA": "ON",
"HDF5_INCLUDE_DIR": "$env{HDF5_ROOT}/include",
"PARTHENON_DISABLE_HDF5_COMPRESSION": "ON",
"Kokkos_ARCH_HOPPER90": "ON",
"NUM_GPU_DEVICES_PER_NODE": "4"
}
Expand Down
107 changes: 107 additions & 0 deletions inputs/dust/dust_coagulation.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# ========================================================================================
# (C) (or copyright) 2023-2024. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001 for Los
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights
# in the program are reserved by Triad National Security, LLC, and the U.S. Department
# of Energy/National Nuclear Security Administration. The Government is granted for
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
# license in this material to reproduce, prepare derivative works, distribute copies to
# the public, perform publicly and display publicly, and to permit others to do so.
# ========================================================================================

<artemis>
problem = coag # name of the pgen
coordinates = cartesian # coordinate system
length = 1.495978707e14 # 10AU in cgs unit
mass = 1.988416e33 # central-star mass (M_sun) in cgs unit
time = 1.5871820329271033e8 # cgs unit in year/(2*pi)*(r0**3/mstar)**0.5
temperature = 2.4753531e4 # kevin (vel**2/kb*mu*mp)
physical_units = cgs # physical unit system

<parthenon/job>
problem_id = coag # problem ID: basename of output filenames

<parthenon/output0>
file_type = hst
dt = 0.628

<parthenon/output1>
variables = gas.prim.density, &
dust.prim.density
file_type = hdf5 # hdf5 data dump
dt = 62.8 # time increment between outputs

<parthenon/output2>
file_type = rst
dt = 628.0

<parthenon/time>
nlim = -1 # cycle limit
tlim = 3768.0 # time limit
integrator = rk2 # time integration algorithm
ncycle_out = 10 # interval for stdout summary info

<parthenon/mesh>
nghost = 2
refinement = none

nx1 = 16 # Number of zones in X1-direction
x1min = 9.0 # minimum value of X1
x1max = 11.0 # maximum value of X1
ix1_bc = outflow # Inner-X1 boundary condition flag
ox1_bc = outflow # Outer-X1 boundary condition flag

nx2 = 1 # Number of zones in X2-direction
x2min = 0.0 # minimum value of X2
x2max = 6.283185307179586 # maximum value of X2
ix2_bc = periodic # Inner-X2 boundary condition flag
ox2_bc = periodic # Outer-X2 boundary condition flag

nx3 = 1 # Number of zones in X3-direction
x3min = -0.5 # minimum value of X3
x3max = 0.5 # maximum value of X3
ix3_bc = periodic # Inner-X3 boundary condition flag
ox3_bc = periodic # Outer-X3 boundary condition flag

<parthenon/meshblock>
nx1 = 16 # Number of cells in each MeshBlock, X1-dir
nx2 = 1 # Number of cells in each MeshBlock, X2-dir
nx3 = 1 # Number of cells in each MeshBlock, X3-dir

<physics>
gas = true
dust = true
coagulation = true

<gas>
cfl = 0.9 # gas cfl number
gamma = 1.00001 # adiabatic index
mu = 2.3 # mean molecular weight

<dust>
cfl = 0.9 # dust cfl number
dfloor = 2.0e-25 # density floor=1e-20*rho0
nspecies = 121 # number of dust size
size_input = logspace # dust size distribution
scr_level = 1 # for hier. scratch registers
grain_density = 1.25 # dust internal density g/cc
min_size = 1e-5 # cm
max_size = 10.0 # cm

<dust/coagulation>
vfrag = 1000.0 # cm/s
coag_int = 1
coag_use_adaptive_step = false
coag_mom_preserve = false
coag_info_out = true
nstep_coag = 10 # number of steps for one coagulation call
const_coag_omega = true # using omega at r0_length
surface_density_flag = true # surface or volume density

<problem>
h0 = 0.05 # scaled height at r0
rho0 = 2.0e-5 # rh0 = sigma_0/sqrt(2*pi)/h0
ninit_dust = 11 # number of dust species initially
dust_to_gas = 0.01 # init dust-to-gas ratio
107 changes: 107 additions & 0 deletions inputs/dust/dust_coagulation_den.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# ========================================================================================
# (C) (or copyright) 2023-2024. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001 for Los
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights
# in the program are reserved by Triad National Security, LLC, and the U.S. Department
# of Energy/National Nuclear Security Administration. The Government is granted for
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
# license in this material to reproduce, prepare derivative works, distribute copies to
# the public, perform publicly and display publicly, and to permit others to do so.
# ========================================================================================

<artemis>
problem = coag # name of the pgen
coordinates = cartesian # coordinate system
length = 1.495978707e14 # 10AU in cgs unit
mass = 1.988416e33 # central-star mass (M_sun) in cgs unit
time = 1.5871820329271033e8 # cgs unit in year/(2*pi)*(r0**3/mstar)**0.5
temperature = 2.4753531e4 # kevin (vel**2/kb*mu*mp)
physical_units = cgs # physical unit system

<parthenon/job>
problem_id = coag # problem ID: basename of output filenames

<parthenon/output0>
file_type = hst
dt = 0.628

<parthenon/output1>
variables = gas.prim.density, &
dust.prim.density
file_type = hdf5 # hdf5 data dump
dt = 62.8 # time increment between outputs

<parthenon/output2>
file_type = rst
dt = 628.0

<parthenon/time>
nlim = -1 # cycle limit
tlim = 3768.0 # time limit
integrator = rk2 # time integration algorithm
ncycle_out = 10 # interval for stdout summary info

<parthenon/mesh>
nghost = 2
refinement = none

nx1 = 16 # Number of zones in X1-direction
x1min = 9.0 # minimum value of X1
x1max = 11.0 # maximum value of X1
ix1_bc = outflow # Inner-X1 boundary condition flag
ox1_bc = outflow # Outer-X1 boundary condition flag

nx2 = 1 # Number of zones in X2-direction
x2min = 0.0 # minimum value of X2
x2max = 6.283185307179586 # maximum value of X2
ix2_bc = periodic # Inner-X2 boundary condition flag
ox2_bc = periodic # Outer-X2 boundary condition flag

nx3 = 1 # Number of zones in X3-direction
x3min = -0.5 # minimum value of X3
x3max = 0.5 # maximum value of X3
ix3_bc = periodic # Inner-X3 boundary condition flag
ox3_bc = periodic # Outer-X3 boundary condition flag

<parthenon/meshblock>
nx1 = 16 # Number of cells in each MeshBlock, X1-dir
nx2 = 1 # Number of cells in each MeshBlock, X2-dir
nx3 = 1 # Number of cells in each MeshBlock, X3-dir

<physics>
gas = true
dust = true
coagulation = true

<gas>
cfl = 0.9 # gas cfl number
gamma = 1.00001 # adiabatic index
mu = 2.3 # mean molecular weight

<dust>
cfl = 0.9 # dust cfl number
dfloor = 1.59577e-24 # density floor=1e-20*rho0
nspecies = 121 # number of dust size
size_input = logspace # dust size distribution
scr_level = 1 # for hier. scratch registers
grain_density = 1.25 # dust internal density g/cc
min_size = 1e-5 # cm
max_size = 10.0 # cm

<dust/coagulation>
vfrag = 1000.0 # cm/s
coag_int = 1
coag_use_adaptive_step = false
coag_mom_preserve = false
coag_info_out = true
nstep_coag = 10 # number of steps for one coagulation call
const_coag_omega = true # using omega at r0_length
surface_density_flag = false # surface or volume density

<problem>
h0 = 0.05 # scaled height at r0
rho0 = 1.59577e-4 # rh0 = sigma_0/sqrt(2*pi)/h0
ninit_dust = 11 # number of dust species initially
dust_to_gas = 0.01 # init dust-to-gas ratio
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ set (SRC_LIST

dust/dust.cpp
dust/dust.hpp
dust/coagulation/coagulation.cpp
dust/coagulation/coagulation.hpp

gas/gas.cpp
gas/gas.hpp
Expand Down Expand Up @@ -57,6 +59,7 @@ set (SRC_LIST
pgen/advection.hpp
pgen/beam.hpp
pgen/blast.hpp
pgen/coag.hpp
pgen/conduction.hpp
pgen/constant.hpp
pgen/disk.hpp
Expand Down
13 changes: 13 additions & 0 deletions src/artemis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "artemis.hpp"
#include "artemis_driver.hpp"
#include "drag/drag.hpp"
#include "dust/coagulation/coagulation.hpp"
#include "dust/dust.hpp"
#include "gas/cooling/cooling.hpp"
#include "gas/gas.hpp"
Expand Down Expand Up @@ -96,6 +97,7 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
const bool do_viscosity = pin->GetOrAddBoolean("physics", "viscosity", false);
const bool do_conduction = pin->GetOrAddBoolean("physics", "conduction", false);
const bool do_radiation = pin->GetOrAddBoolean("physics", "radiation", false);
const bool do_coagulation = pin->GetOrAddBoolean("physics", "coagulation", false);

// Determine input file specified algorithms
const bool do_imc = do_radiation && pin->DoesBlockExist("radiation/imc");
Expand All @@ -114,6 +116,8 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
"Radiation requires the gas package, but there is not gas!");
PARTHENON_REQUIRE(!(do_imc && do_moment),
"Cannot simultaneously evolve IMC and moments radiation");
PARTHENON_REQUIRE(!(do_coagulation) || (do_coagulation && do_dust),
"Coagulation requires the dust package, but there is not dust!");

// Store configuration choices in params
artemis->AddParam("do_gas", do_gas);
Expand All @@ -127,6 +131,7 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
artemis->AddParam("do_conduction", do_conduction);
artemis->AddParam("do_diffusion", do_conduction || do_viscosity);
artemis->AddParam("do_radiation", do_radiation);
artemis->AddParam("do_coagulation", do_coagulation);
artemis->AddParam("do_imc", do_imc);
artemis->AddParam("do_moment", do_moment);
artemis->AddParam("do_shear", do_shear);
Expand All @@ -149,6 +154,14 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
if (do_rotating_frame) packages.Add(RotatingFrame::Initialize(pin.get()));
if (do_cooling) packages.Add(Gas::Cooling::Initialize(pin.get()));
if (do_drag) packages.Add(Drag::Initialize(pin.get()));

// Operator split dust coagulation
if (do_coagulation) {
auto &dust_params = packages.Get("dust")->AllParams();
packages.Add(Dust::Coagulation::Initialize(pin.get(), dust_params, units, constants));
}

// Operator split radiation
if (do_radiation) {
// Top-level radiation package
packages.Add(Radiation::Initialize(pin.get(), constants, do_imc));
Expand Down
3 changes: 3 additions & 0 deletions src/artemis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ namespace prim {
ARTEMIS_VARIABLE(dust.prim, density);
ARTEMIS_VARIABLE(dust.prim, velocity);
} // namespace prim
namespace coag {
ARTEMIS_VARIABLE(dust.coag, ncalls);
}
} // namespace dust

namespace rad {
Expand Down
6 changes: 6 additions & 0 deletions src/artemis_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "artemis.hpp"
#include "artemis_driver.hpp"
#include "drag/drag.hpp"
#include "dust/coagulation/coagulation.hpp"
#include "dust/dust.hpp"
#include "gas/cooling/cooling.hpp"
#include "gas/gas.hpp"
Expand Down Expand Up @@ -69,6 +70,7 @@ ArtemisDriver<GEOM>::ArtemisDriver(ParameterInput *pin, ApplicationInput *app_in
do_diffusion = do_viscosity || do_conduction;
do_imc = artemis_pkg->template Param<bool>("do_imc");
do_moment = artemis_pkg->template Param<bool>("do_moment");
do_coagulation = artemis_pkg->template Param<bool>("do_coagulation");

// Moments integrator
if (do_moment) {
Expand Down Expand Up @@ -131,6 +133,10 @@ TaskListStatus ArtemisDriver<GEOM>::Step() {
if (do_moment) status = Moments::MomentsDriver<GEOM>(pmesh, tm, rad_integrator.get());
if (status != TaskListStatus::complete) return status;

// Operator split, dust coagulation
if (do_coagulation) status = Dust::Coagulation::CoagulationDriver<GEOM>(pmesh, tm);
if (status != TaskListStatus::complete) return status;

// Compute new dt, (de)refine, and handle sparse (if enabled)
status = PostStepTasks().Execute();

Expand Down
2 changes: 1 addition & 1 deletion src/artemis_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ArtemisDriver : public EvolutionDriver {
StateDescriptor *artemis_pkg;
bool do_gas, do_dust, do_moment, do_imc;
bool do_gravity, do_nbody, do_rotating_frame, do_shear;
bool do_cooling, do_drag, do_viscosity, do_conduction, do_diffusion;
bool do_cooling, do_drag, do_viscosity, do_conduction, do_diffusion, do_coagulation;
const bool is_restart;
};

Expand Down
Loading
Loading