geodynamics / Rayleigh

Rayleigh: Pseudo-spectral MHD
GNU General Public License v3.0
61 stars 48 forks source link

Fix with_custom for heating #492

Closed illorenzo7 closed 6 months ago

illorenzo7 commented 10 months ago

The with_custom framework successfully modifies the heating by a custom reference file. However, the flag "adjust_reference_heating" has been set to .true. earlier (for any heating_type > 0) and so the user's choices will possibly be overwritten in the boundary conditions file.

This pull request changes adjust_reference_heating back to .false. if the user sets a custom heating profile using the with_custom framework.

illorenzo7 commented 10 months ago

I just realized this is failing one of the "with_custom" Jones benchmark case 0 tests. I may be being obstinate, but I think this test SHOULD have been failing before and (possibly) not falling after this pull request. I just confirmed that the simulation under

tests/custom_reference/augment/main_input

results in a heating function being zero because of the adjust_reference_heating issue. Presumably this case was meant to test what happens with nonzero heating in the Jones benchmark?

Unless I am missing something, I would then suggest replacing the file

tests/custom_reference/augment/Benchmark_Reports/00000200

which would presumably make this pull request pass the test.

feathern commented 10 months ago

I'll try to look at this in detail soonish. Might be a couple of days, but I'm aware of the PR.

illorenzo7 commented 10 months ago

Because of the latest approved pull requests, I removed the duplicate commit from #490 (the divide by N^2=0 pull request) and then rebased this off "main" to make the analysis of the specific change here more easily readable.