Skip to content

Commit

Permalink
Fixes for EnergyFluxBC (residual), EnergyExcitation and Energy Ioniza…
Browse files Browse the repository at this point in the history
…tion (Jacobians), and JouleHeating (OffDiag Jacobians)
  • Loading branch information
cticenhour committed Sep 13, 2018
1 parent 31f21c5 commit 5033acd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
9 changes: 4 additions & 5 deletions src/bcs/EnergyFluxBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EnergyFluxBC::computeQpResidual()
{
return _test[_i][_qp] * _normals[_qp] *
((5 / 2) * (2 / 3) * _u[_qp] * 0.25 *
std::pow((8 * (2 / 3) * _u[_qp]) / (libMesh::pi * _electron_mass), 0.25) *
std::pow((8 * (2 / 3) * _u[_qp]) / (libMesh::pi * _electron_mass), 0.5) *
_electron_density[_qp] * _normals[_qp] -
_secondary_electron_coefficient * (5 / 2) * _T_secondary_electron *
(-_ion_mobility * _ion_density[_qp] * _grad_potential[_qp]));
Expand All @@ -50,9 +50,8 @@ Real
EnergyFluxBC::computeQpJacobian()
{
return _test[_i][_qp] * _normals[_qp] *
((5 / 2) * (2 / 3) * 0.25 *
std::pow((8 * (2 / 3)) / (libMesh::pi * _electron_mass), 0.25) * _electron_density[_qp] *
1.5 * std::pow(_u[_qp], 0.25) * _phi[_j][_qp] * _normals[_qp]);
((5 / 2) * (2 / 3) * 0.25 * std::pow((8 * (2 / 3)) / (libMesh::pi * _electron_mass), 0.5) *
_electron_density[_qp] * 1.5 * std::pow(_u[_qp], 0.5) * _phi[_j][_qp] * _normals[_qp]);
}

Real
Expand All @@ -61,7 +60,7 @@ EnergyFluxBC::computeQpOffDiagJacobian(unsigned int jvar)
if (jvar == _electron_id)
return _test[_i][_qp] * _normals[_qp] *
((5 / 2) * (2 / 3) * _u[_qp] * 0.25 *
std::pow((8 * (2 / 3) * _u[_qp]) / (libMesh::pi * _electron_mass), 0.25) *
std::pow((8 * (2 / 3) * _u[_qp]) / (libMesh::pi * _electron_mass), 0.5) *
_phi[_j][_qp] * _normals[_qp]);

else if (jvar == _ion_id)
Expand Down
6 changes: 5 additions & 1 deletion src/kernels/EnergyExcitation.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ EnergyExcitation::computeQpResidual()
Real
EnergyExcitation::computeQpJacobian()
{
return 0;
return _test[_i][_qp] * _energy_exchange * _N_gas * _electron_density[_qp] *
(5e-15 * 0.74 * std::pow((2 / 3), 0.74) * std::pow(_u[_qp], -0.26) *
std::exp(-11.56 * 3 / (2 * _u[_qp])) +
5e-15 * std::pow((2 * _u[_qp] / 3), 0.74) * (11.56 * 3 / (2 * _u[_qp] * _u[_qp])) *
std::exp(-11.56 * 3 / (2 * _u[_qp])));
}

Real
Expand Down
6 changes: 5 additions & 1 deletion src/kernels/EnergyIonization.C
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ EnergyIonization::computeQpResidual()
Real
EnergyIonization::computeQpJacobian()
{
return 0;
return _test[_i][_qp] * _energy_exchange * _N_gas * _electron_density[_qp] *
(2.34e-14 * 0.59 * std::pow((2 / 3), 0.59) * std::pow(_u[_qp], -0.41) *
std::exp(-17.44 * 3 / (2 * _u[_qp])) +
2.34e-14 * std::pow((2 * _u[_qp] / 3), 0.59) * (17.44 * 3 / (2 * _u[_qp] * _u[_qp])) *
std::exp(-17.44 * 3 / (2 * _u[_qp])));
}

Real
Expand Down
5 changes: 2 additions & 3 deletions src/kernels/JouleHeating.C
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ JouleHeating::computeQpOffDiagJacobian(unsigned int jvar)

else if (jvar == _potential_id)
return -_test[_i][_qp] * _e *
(-_diffusivity * _grad_electron_density[_qp] +
_mobility * _electron_density[_qp] * _grad_phi[_j][_qp]) *
_grad_phi[_j][_qp];
(-_diffusivity * _grad_electron_density[_qp] * _grad_phi[_j][_qp] +
2 * _mobility * _electron_density[_qp] * _grad_potential[_qp] * _grad_phi[_j][_qp]);

else
return 0;
Expand Down

0 comments on commit 5033acd

Please sign in to comment.