mwiesenberger / feltor

Numerical methods for edge and SOL blob and turbulence simulations
http://feltor-dev.github.io
MIT License
4 stars 2 forks source link

1/B factor in kinetic energy #2

Closed mwiesenberger closed 5 years ago

mwiesenberger commented 6 years ago

There might be a 1/B factor missing in the toefl code energy theorem

else if ( equations == "drift_global") 
    {
        double Se = dg::blas2::dot( lny[0], w2d, ype[0]);
        //double Ephi = 0.5*dg::blas2::dot( ype[0], w2d, omega);
        double Ephi = dg::blas2::dot( ype[0], w2d, phi[1]);
        energy_ = Se + Ephi;

        double Ge = - dg::blas2::dot( one, w2d, lapy[0]) - dg::blas2::dot( lapy[0], w2d, lny[0]); // minus 
        double GeE = - dg::blas2::dot( phi[1], w2d, lapy[0]); 
        double Gpsi = -dg::blas2::dot( phi[0], w2d, lapy[1]);
        //std::cout << "ge "<<Ge<<" gi "<<Gi<<" gphi "<<Gphi<<" gpsi "<<Gpsi<<"\n";
        ediff_ = nu*( Ge - GeE - Gpsi);
    }
mwiesenberger commented 5 years ago

resolved in new release