I am attempting to develop a MHD solver based on the BlastFoam. In my solver, the Lorentz force and Joule heat are added to the Euler equation as source terms.
In the code section, both the judgement needSolve(U_.name()) and needSolve(e_.name()) are always false. And this method to add external source may be not suitable for BlastFoam. Therefore, I want to know how to correctly add an external source in a user-defined BlastFoam solver.
Hi, everyone
I am attempting to develop a MHD solver based on the BlastFoam. In my solver, the Lorentz force and Joule heat are added to the Euler equation as source terms.
The class
compressibleBlastSystem
provides two functions, i.e.addUSource
andaddESource
. As I understant it, these two functions give the interface to add user-defined source terms. However, I found these the source terms would not be called when the flow is inviscid. I think this issue is caused by the following code in thepostUpdate
function. https://github.com/synthetik-technologies/blastfoam/blob/cb50fc49f4d8163159eaefa244a7e16071dba2dc/src/compressibleSystem/compressibleBlastSystem/compressibleBlastSystem.C#L166-L230In the code section, both the judgement
needSolve(U_.name())
andneedSolve(e_.name())
are always false. And this method to add external source may be not suitable for BlastFoam. Therefore, I want to know how to correctly add an external source in a user-defined BlastFoam solver.