Feature: Auxiliary scalars#467
Conversation
|
Regarding your discussion points:
As always, I appreciate the new capability, which I'm sure will be quite useful to many. |
|
I'll leave a note here of changes made/needed:
Additionally, I don't know why the Lint-codespell test has started failing - it seems to not like a naming convention for a variable that I have not touched. |
|
A new version of codespell was released and it catches a few more things. The fix for that is in #469. |
|
For the remaining issue of what to do about |
|
The CellData approach seems to work well. I think it gives a cleaner interface to the boundaries than the existing setup. It has also made the |
|
If I compile the 2D PassiveScalar case with @bssoriano noticed some issues when corse/fine boundaries intersect with inflows. Perhaps this is related. |
|
I've traced the issue to the auxiliary boundaries not being filled properly at initialisation, but I can't figure out where the problem is. If you compile in debug mode and turn on the FPE catches, it crashes when looking for some boundary data (regardless of with/without EB). I've probably missed a fillpatch somewhere, but I can't spot it—I'll keep working on it. |
Added separate flag to turn off diffusion
Le=1 is used when schmidt < 0. Future implementation could have the user specify the Le number for each transported variable
The code returning erroneous operation when AMR was at the inflow BC for max_level = 2, and had non-physical values when max_level = 1. The problem was related to regrid.
Fix auxiliary scalars with AMR
|
Thanks to some work from @bssoriano, we spotted the missing boundary data. I've also made some things more strongly typed (more const's and constexpr's) and gone through and used the m2c/c2m unit conversions in the kernel functions where possible. |
|
Some final fixes that let this run with EB in debug mode: ITV-RWTH#5 A last thing is that it looks like we don't apply redistribution for the Aux variables with EB, but that can wait. I'd like to get this merged before #477. |
|
Thanks again @ThomasHowarth for the new capability and @bssoriano for helping to find the fillpatching issues. I think this is in good enough shape to merge now, although some of the EB stuff might need to be revisited eventually. |
This pull request may close #465
Auxiliary variables are added through the following flags in the input:
where the
advectparameter determines whether or not the variable is transported, and thediff_coeffprovides a diffusion coefficient.The test case transports/diffuses a Gaussian profile through a periodic domain. For a 1m square domain, with 1m/s upward velocity, I see the following:
Discussion points:
pelelmex_initdataandbcnormal) have been adjusted. I've done this to all cases, but when people pull this, their current cases may not compile. Not sure how to address this.peleLM.incompressible = 1s_auxarray passed tobcnormalneeds to be hardcoded. I've set this toNVARand put a check to make sure thatm_nAux < NVAR, but perhaps there is a more elegant way to do this.