Nek5000 / nekRS

our next generation fast and scalable CFD code
https://nek5000.mcs.anl.gov/
Other
290 stars 76 forks source link

Inconsistent thermal divergence in low-Mach formulation #587

Open stgeke opened 2 months ago

stgeke commented 2 months ago

Discussed in https://github.com/Nek5000/nekRS/discussions/586

Originally posted by **bnkeeton** September 18, 2024 I've been using the low-Mach formulation in nekRS v23 and found that the evaluation of the thermal divergence seems incorrect for the problem I'm working on. To test this, I've set up a very simple case in a cylindrical domain with a stagnant initial flow superimposed by a spherical hot spot. I run the case for a single small time step, and then output the thermal divergence and compare it to the identical case run with nek5000 by plotting along the line [0,0,0] to [6,0,0]. I have confirmed through separate software that the nek5000 solution is correct. A plot showing the discrepancy is attached, along with both sets of case files. The red curve represents the correct, symmetrical nek5000 thermal divergence, and the blue is nekRS. One additional item I found interesting is that if you set the thermal conductivity `k1` to be constant by changing `sigma1=0` in both cases, the two codes then produce identical values for the divergence. I tried inspecting the relevant kernel `qtlHex3D` but I do not see anything off. div [nek5000_jet_1.zip](https://github.com/user-attachments/files/17048732/nek5000_jet_1.zip) [nekrs_jet_1.zip](https://github.com/user-attachments/files/17048733/nekrs_jet_1.zip) Thanks, Ben Keeton
stgeke commented 2 months ago

There is a bug in the qtlHex3D when loading the diffusivity.