Skip to content

Commit

Permalink
Paired with StylES commit 74828a8df7db19f70c7c742444b752ad887e375d: R…
Browse files Browse the repository at this point in the history
…everted to split terms
  • Loading branch information
jonycastagna committed Dec 14, 2023
1 parent 9e98e55 commit d9b2391
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/hasegawa-wakatani/hw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ class HW : public PhysicsModel {
Field3D pPhiVort;
Field3D pPhiN;

Field3D tPhiVort;
Field3D tPhiN;


int totCount = 0;
Expand Down Expand Up @@ -553,6 +555,8 @@ class HW : public PhysicsModel {
pPhiVort = 0.;
pPhiN = 0.;

tPhiVort = 0.;
tPhiN = 0.;



Expand Down Expand Up @@ -658,8 +662,8 @@ class HW : public PhysicsModel {
for(int i=2; i<n.getNx()-2; i++) // we assume 2 guards cells in x-direction
for(int j=0; j<1; j++)
for(int k=0; k<n.getNz(); k++){
pPhiVort(i,j,k) = rLES[cont + 0*N_LES*N_LES];
pPhiN(i,j,k) = rLES[cont + 1*N_LES*N_LES];
tPhiVort(i,j,k) = rLES[cont + 0*N_LES*N_LES];
tPhiN(i,j,k) = rLES[cont + 1*N_LES*N_LES];
cont = cont+1;
}

Expand Down Expand Up @@ -728,8 +732,8 @@ class HW : public PhysicsModel {
// Diffusive terms
mesh->communicate(n, vort);

ddt(vort) = - Dvort*Delp4(vort);
ddt(n) = - Dn*Delp4(n);
ddt(vort) = - Dvort*Delp4(vort) + tPhiVort;
ddt(n) = - Dn*Delp4(n) + tPhiN;


if (pStep>pStepStart)
Expand Down

0 comments on commit d9b2391

Please sign in to comment.