Skip to content

Commit

Permalink
MFsurfchem - change number density to pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
HyuntaeJung committed Sep 23, 2024
1 parent 9367bde commit bfe9796
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ surf_site_num_dens = 1.027285e+15

# adsorption rate = ads_rate_const * num_dens
# desoprtion rate = des_rate
ads_rate_const = 1.770226e-11
ads_rate_const = 1.831671e+02
des_rate = 3.702336e+07

# e_beta = 0 # no additional energy update
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@

sprob = 1.
rads1 = sprob*rcol1
kads1 = rads1/n1
kads1 = rads1/p1

kdes1 = rads1*math.exp((-delta_mu1+E_bind)*eV_cgs/(kB*temp))

Expand All @@ -162,7 +162,7 @@

print("- sticking prob = %f" % sprob)
print("- rads1 = %e (rate)" % rads1)
print("- kads1 = rads1/n1 (rate const) = %e" % kads1)
print("- kads1 = rads1/p1 (rate const) = %e" % kads1)

print("- kdes1 = %e" % kdes1)

Expand Down
6 changes: 3 additions & 3 deletions src_MFsurfchem/MFsurfchem_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void InitializeMFSurfchemNamespace()
stoch_MFsurfchem = 1; // default value
pp.query("stoch_MFsurfchem",stoch_MFsurfchem);

k_beta = 0.5; // default value
k_beta = -0.5; // default value
pp.query("k_beta",k_beta);

e_beta = 0.5; // default value
Expand Down Expand Up @@ -153,8 +153,8 @@ void sample_MFsurfchem(MultiFab& cu, MultiFab& prim, MultiFab& surfcov, MultiFab
amrex:: Real tempratio = prim_arr(i,j,k,4)/T_init[0];

for (int m=0;m<n_ads_spec;m++) {
amrex::Real dens = cu_arr(i,j,k,5+m); // mass density
dens *= AVONUM/molmass[m]; // number density
amrex::Real dens = prim_arr(i,j,k,5); // total pressure
dens *= prim_arr(i,j,k,6+nspecies+m); // partial pressure

amrex::Real theta = surfcov_arr(i,j,k,m);

Expand Down

0 comments on commit bfe9796

Please sign in to comment.