Skip to content

[BUG] Inconsistency in output of energy-momentum tensor #147

@xwgong01

Description

@xwgong01
File

File: src/kernels/particle_moments.hpp
Module: kernel::ParticleMoments_kernel

Bug Description

The calculation of the stress-energy tensor moments (FldsID::T) in ParticleMoments_kernel contains inconsistent mass scaling factors across its different components, which leads to incorrect results.

According to the wikipage, the tensor Tij to be calculated by integrating of u^i u^j / u^0, which is the standard tensor normalized by m. However, the output in the code relates to the standard tensor T_std as follows:

  • T00_code = T00_std

  • T0i_code = T0i_std / m

  • Tij_code = Tij_std / m^2

The problem is caused by line 166 of particle_moments.hpp, where the mass is included in the energy:

energy = mass * math::sqrt(ONE + NORM_SQR(u_Phys[0], u_Phys[1], u_Phys[2]));

Suggested Solution:

The mass should be removed from the expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions