Hello everyone, I want to add a new Riemann solver, with flux solutions are different with PyFr on the left and right sides of the interface. such as the below picture, in my understanding, ‘fl’, ‘fr’ come from inviscid_flux function, and I did’t find the inviscid_flux function. but in my Riemann solver, the definition of ‘fl’, ‘fr’ is different.
How should I change the definition of ‘fl’, ‘fr’? Could anyone help me?
The outputs from this function can be changed from equation set to equation set, but in Euler the input is u and the outputs are f, v, and p. Where u is a vector of conserved variables, f is a [ndims]x[nvars] array, v is the velocity vector, and p is the pressure.
Using the standard 1D transformation, you can actually change what you need to calculate. This might be easier for more complex equation sets and an example can be seen in my implementation here: GitHub - WillTrojak/PyFR at feature/riemann_solvers
If the fluxes are different on the left and right hand side then it is very easy to lose conservation. Further, PyFR makes no guarantees about what interface is classed as left and which is classed as right. Do you have any more detail about what you’re looking to accomplish?
Checkout the branch I linked, I think from what you have said you need to use the methodology implemented there for some of the Riemann solvers. I.e you use the surface normal to transform the problem into a 1D problem, get the 1D common flux, and then transform it back.
Follow your idea, I write Riemann solver in x direction as a 1D problem. but it does’t work, I think I should add this Riemann solver somewhere, PyFr can’t recognize this Riemann solver. Could you tell me how to solve it?
And how can I get the grid step dx, dy, dz when I write Riemann solver?
When you say PyFR can’t recognize the Riemann solver, what do you mean? The functionality I sent you links to is not mainlined, so firstly you would need to bring that all in and verify it works. Secondly, say you implemented a Riemann solver new_solver.mako, in the ini file you would have to set riemann-solver = new_solver. You also have to make sure the Riemann solver is in correct directory for the physical solver you are trying to use, set by system in the ini file, remembering that advection-diffusion systems inherit from advection systems,
If that doesn’t solve your problems, then can you post the traceback?
In answer to your question on dx, dy, dz, I think there is no way to get this information, is that right @fdw?
So you are trying to use my transformed implementation. This indicates to me that you have forgotten to add one of the files along the way or forgotten to include <%include file='pyfr.solvers.euler.kernels.rsolvers.rsolve_trans'/> at the bottom.
The van Leer solver implementation in that branch uses the 1D transformation, as does the Roe in that branch. I think it is most likely that you haven’t fully implemented the functionality of that branch.