Please bear with me, I'm a re
Please bear with me, I'm a relative newbie to FOAM.
I had a few questions about implementing flux splitting methods in FOAM.... Q1. Where does one find details of upwind differencing schemes? What I really want to do is test a solver that uses flux vector splitting, but in foam I cannot figure out how to force upwind biasing because foam seems to be too high level. In other words, I figure I can specifiy upwinding no problemo, but if I want to solve the governing equations in two step, one with positive wave speeds only, the other with negatie wave speeds only, how do I do that in FOAM? I see foam comes with upwind differenceing schemes, but I cannot tell what exactly those schemes perform, do they do the wave speed analysis and so forth under the hood, or do they simply apply upwinding based upon the local net flow direction without splitting the flux? What I do is find my matrix of wave speeds, by diagonalizing the Jacobians of my flux vectors, then I want to split the wave speeds into positive and negative parts, and then apply upwind biasing. Is it likely that foam does not give me the flexibility to perform such low level operations? Q2. Related to flux splitting, and considering I'm a relative newbie to CFD, I was wondering if any experts out there can advise me on whether flux splitting is worth bothering with, e.g., perhaps the Gamma schemes are better and flux splitting is passe in state of the art CFD? (I'm not a CFD expert, merely a user of CFD tools for engineering physcis, so I'm probably a decade or more behind in what is trendy in CFD.) That brings me to another question: when is it appropriate to use Gamma schemes rather than upowind schems or blended? I'd really like a scheme that works well with moderate viscosity gas dynamic shock equations and with magnetohydrodynamic shocks. I've tested FCT methods in my own FORTRAN code, but I'd rather move up to 3D with FOAM. But I'm not sure at the outset what tools will work with strong field MHD equations. I guess some experimentation is in order, but can anyone advise or give me hints at what solver options would be most apt? Any advice would be welcomethe more testing I have to do the better it'll be for my foam usage education. Thanks for any considerations, Blair. 
Q1. It sounds like you need t
Q1. It sounds like you need to write your own discretisation scheme. OpenFOAM should be out today, with full source available for everything. You can find details of the upwind implementation in "upwind.H" in the main library.
Welcome to the foam discussion forum by the way. Eugene 
Hi Eugene,
Slight diversio
Hi Eugene,
Slight diversion from the original post, but what exactly is OpenFOAM? And how does it differ from FOAM? I see there is an OpenFoam project on SourceForge, but this seems related to communication protocols, so I guess this isn't it! Thanks for the information. Jason 
Hi Jason,
Foam is going op
Hi Jason,
Foam is going open source via the GNU GPL under the name OpenFOAM. You wont find anything on a search engine, because it hasn't been released yet. Imminent though. Keep checking www.openfoam.com. Once the site is up you should be able to download the OpenFOAM code. Eugene 
Hello,
I have a similar prob
Hello,
I have a similar problem as it was described in the original post. What I would like to have is an implicit and densitybased solver for high speed aerodynamics (e.g. Roe, van Leer, AUSM, ...). Has anybody done something like this with FOAM already? I am very new to FOAM, but from what I have read so far it seems like the fluxes are computed, using a construction of the variables on the cell interfaces. For a densitybased solver the fluxes would be computed based on left and right sided variables (based on the characteristics). Any advice how to implement something like this and where to look for examples would be appreciated. Thanks, Oliver 
rhoSonicFoam and rhopSonicFoa
rhoSonicFoam and rhopSonicFoam are both densitybased solvers with the latter also including a pressure equation for transsonic problems including regions of low Ma. We have also developed a new version of rhopSonicFoam with improved interpolation practices for the fluxes which is proving to be far superior to simple Rho etc. methods which will be included in the next release of OpenFOAM.

First of all, thanks for the
First of all, thanks for the reply!!
I forgot to say that I would like to have an upwind solver ... the problems that I have in mind have very low ambient pressures and very high speeds (2 < Ma < 6), perfect gas should still be a valid assumption. I would like to get to know the code a little and I thought a simple upwind solver like van Leer would be a good starting point. Do you think it is possible and if yes, where should I look for examples? As for the other compressible methods that you have implemented, do you have papers describing the numerics? Thanks a lot, Oliver 
> I forgot to say that I would
> I forgot to say that I would like to have an upwind solver
Fine, just choose upwind differencing for the convection terms although you will probably be better off choosing an NVD or TVD scheme like van Leer or MUSCL. > ... the problems that I have in mind have very low ambient > pressures and very high speeds (2 should still be a valid assumption. I would like to get to > know the code a little and I thought a simple upwind solver > like van Leer would be a good starting point. I consider van Leer to be a convection differencing scheme rather than a complete solver. > Do you think > it is possible and if yes, where should I look for examples? sonicFoam, rhoSonicFoam, rhopSonicFoam. > As for the other compressible methods that you have > implemented, do you have papers describing the numerics? Nope, I never wrote papers on this stuff nor on many of the other algorithms in FOAM I was too busy writing FOAM. 
With upwind scheme I mean a s
With upwind scheme I mean a splitting method.
To avoid confusion, what I would like to do is the following: 1. Use a method to construct variables on both sides of the interface (MUSCL, ...). For unstructured grids I found that limiting the order to capture shocks is not trivial. 2. Use a splitting (Roe, van Leer, AUSM, ...) to compute the fluxes. For an implicit scheme this would have to be linearised and only the linearised part would be treated implicitly. This might be a bit classical and oldfashioned, but it works well for the type of flow I have in mind. I will still try the other solvers you have mentioned. Thanks, Oliver 
I prefer the methods I have i
I prefer the methods I have implemented in FOAM, in particular the new approach to be released shortly, as they are 2ndorder, work well on any meshes including polyhedra, give good shockcapturing and conservation of the important properties. I have not implemented any of the splitting techniques you have mentioned because they tend to be loworder and difficult to extend to unstructured meshes. However, I understand that some FOAM users have implemented such techniques, maybe they can help you...

Thanks for your help and I wi
Thanks for your help and I will certainly try what you have implemented in FOAM as it sounds very interesting. The methods I mentioned are 2nd order (apart from the limiter close to the shocks), conservative and they work well on most meshes (limiter becomes more difficult) as well. For lower speeds, however, they are not the best choice ... and the density based + pressure equation solver you mentioned sounds very attractive!
Still if someone has implemented a classical flux vector or flux difference splitting  any help would be appreciated. 
In my opinion, for the kind o
In my opinion, for the kind of flows you are interested in, nothing can beat a proper Roe flux solver. However, you need all the bits, including geometric multigrid, explicit/point implicit/fully implicit solvers etc. and not just an explicit Roe flux approach. Gradient reconstruction stuff we've got should be OK and geometric multigrid is easy on polyhedral cells. There is a lot of published literature on this and implementing it should be relatively straightforward.
I know a guy who had a play with the Roe schemes in foam a while back but I don't know if it has ever been completed  it certainly isn't a part of the release. As for the implicit solvers, you will need a block matrix solver approach which is currently not implemented (all solvers are segregated). This is something I will be working on over the next 34 months... Hrv 
> In my opinion, for the kind
> In my opinion, for the kind of flows you are interested in, nothing can beat a proper Roe flux solver.
I disagree. > However, you need all the bits, including geometric multigrid, explicit/point implicit/fully implicit solvers etc. and not just an explicit Roe flux approach. I certainly don't see the need for all these frills. > I know a guy who had a play with the Roe schemes in foam a while back but I don't know if it has ever been completed  it certainly isn't a part of the release. The results were not competitive with results from the codes already included in the FOAM release and certainly not with the new code I have written which even beats WIND and this is why we did not include this work in the release. 
Try running your code on the
Try running your code on the Courant number of 300 :)
The aerospace industry relies precisely on the kind of solvers I have described and stays away from any pressurebase algorithms because they are typically a factor fo 10 or more slower than what they are using. 
> Try running your code on th
> Try running your code on the Courant number of 300 :)
I have a steadystate formulation for steadystate cases and I don't think a Co of 300 is appropriate for transient running. > The aerospace industry relies precisely on the kind of solvers I have described and stays away from any pressurebase algorithms because they are typically a factor fo 10 or more slower than what they are using. rhoSonicFoam is not pressurebased in my new code the pressure equation is runtime selectable so for supersonic cases it can be switched off and for transsonic or cases with boundary layers it can be switched on to improve stability and performance. The comparisons which have been done so far show that this approach is much faster than the Rhobased approches you are advocating. 
What about a comparison? I wi
What about a comparison? I will try to get the hang of using FOAM and compare its results to some of the more classical solvers we have here. Do you have a low Re turbulence model for compressible flow? Right now we are mainly using Spalart Almaras and SST. Actually, for a start, an Euler test case or laminar flow might be alright.
Thanks a lot so far, Oliver 
What about a comparison? I wi
What about a comparison? I will try to get the hang of using FOAM and compare its results to some of the more classical solvers we have here. Do you have a low Re turbulence model for compressible flow? Right now we are mainly using Spalart Almaras and SST. Actually, for a start, an Euler test case or laminar flow might be alright.
Thanks a lot so far, Oliver 
We will put together a webpa
We will put together a webpage with results and comparisons of the new rhopSonicFoam solver and release it at the same time as the solver early next year.
We have implemented several turbulence models for compressible flow but none with special terms for shocks, boundarylayer interaction etc. although I don't envisage that this will be too difficult and should be something you will be able to do if you are familar with these models. 
Since this thread is quite old
Since this thread is quite old, did someone implement some flux splitting based method?
Thanks in advance for any information you can provide, Alberto 
there is not a Roe solver yet in openFoam?even in before releases?
Thanks. 
All times are GMT 4. The time now is 10:05. 