~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to lib/atc/WeakEquationElectronTemperature.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
  const Material * material,
131
131
  DENS_MAT &flux) const
132
132
{
 
133
  
133
134
  // call base class to get electron_temperature terms
134
135
  WeakEquationElectronTemperature::N_integrand(fields, grad_fields, material, flux);
 
136
  // Joule heating = -I.grad Psi = J.grad Psi \approx J.E
135
137
  DENS_MAT jouleHeating; 
136
 
  material->electron_flux (fields, grad_fields, _J_);
 
138
  material->electron_flux (fields, grad_fields, _J_); 
137
139
  material->electric_field(fields, grad_fields, _E_);
138
140
  jouleHeating = _J_[0].mult_by_element(_E_[0]);
139
141
  for (DENS_MAT_VEC::size_type i=1; i < _J_.size(); i++)
140
142
    jouleHeating += _J_[i].mult_by_element(_E_[i]);
141
143
  jouleHeating *= eV2E_;
142
 
  flux += jouleHeating;
 
144
  flux -= jouleHeating; 
143
145
  return true;
144
146
}
145
147
 
151
153
//  Constructor
152
154
//--------------------------------------------------------------
153
155
WeakEquationElectronTemperatureConvection::WeakEquationElectronTemperatureConvection()
154
 
  : WeakEquationElectronTemperature()
 
156
  : WeakEquationElectronTemperatureJouleHeating()
155
157
{
156
158
  int nSD = 3; 
157
159
  _convectiveFlux_.assign(nSD, DENS_MAT()); 
174
176
{
175
177
  // add diffusion term
176
178
  
177
 
  WeakEquationElectronTemperature::B_integrand(fields, grad_fields, material, flux);
 
179
  WeakEquationElectronTemperatureJouleHeating::B_integrand(fields, grad_fields, material, flux);
178
180
  //flux[0] = 0.;
179
181
  //flux[1] = 0.;
180
182
  //flux[2] = 0.;
195
197
  DENS_MAT &flux) const
196
198
{
197
199
  // call base class to get electron_temperature terms
198
 
  WeakEquationElectronTemperature::N_integrand(fields, grad_fields, material, flux);
 
200
  WeakEquationElectronTemperatureJouleHeating::N_integrand(fields, grad_fields, material, flux);
 
201
#ifdef TEST
199
202
  // add exchange with kinetic energy
200
203
  DENS_MAT keExchange;
201
204
  DENS_MAT capacity;
220
223
  keExchange *= capacity;
221
224
  
222
225
  flux -= keExchange;
223
 
 
 
226
#endif
224
227
  return true;  
225
228
}
226
229