Skip to content

Commit

Permalink
FEAT: implicit parallel velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjridley committed Nov 14, 2024
1 parent 2a4bf5a commit 2c78ed8
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/calc_ion_drift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,13 @@ void Ions::calc_ion_drift(Neutrals neutrals,
top = rho_nuin % a_perp[iComp] + Nie % a_x_b[iComp];
species[iIon].perp_velocity_vcgc[iComp] = top / bottom;

a_par[iComp] = total_forcing[iComp];
// Steady state:
species[iIon].par_velocity_vcgc[iComp] =
a_par[iComp] / rho / nuin_sum;
//species[iIon].par_velocity_vcgc[iComp] =
// (species[iIon].par_velocity_vcgc[iComp] + a_par[iComp] * dt / rho) /
// (1 + nuin_sum * dt);
// a_par[iComp] / rho / nuin_sum;
species[iIon].par_velocity_vcgc[iComp] =
(species[iIon].par_velocity_vcgc[iComp] + a_par[iComp] * dt / rho) /
(1 + nuin_sum * dt);
species[iIon].par_velocity_vcgc[iComp].clamp(-100, 100);
/*
std::cout << iComp << " " << iIon << " " << a_par[iComp](2,2,20) << " " << rho(2,2,20) << " "
<< nuin_sum(2,2,20) << " "
<< species[iIon].par_velocity_vcgc[iComp](2,2,20) << "\n"; */
}
} else {
// No Planetary Magnetic field
Expand Down

0 comments on commit 2c78ed8

Please sign in to comment.