buoyantPimpleFoam high Courant numbers
Dear Foamers,
I'm simulating a small Rayleigh-Benard cell filled with water under Boussinesq conditions. I've already been running successful simulations using buoyantBoussinesqPimpleFoam and now I want to generate results for the same case using buoyantPimpleFoam, in order to implement temperature dependent properties after validation. The problem I'm currently facing is that solving using buoyantPimpleFoam appears to generate much higher Courant numbers, resulting in a simulation time that is ridiculously long. I have no idea why this is happening, because all my simulation parameters seem to be the same as when using buoyantBoussinesqPimpleFoam. In short, the only changes that I've made are using a different solver, and using polynomial values for the transport coefficients (which I've set to the same constants as before for the time being). Can you tell me what I'm doing wrong? As you can probably tell, I'm not an expert at finite volume methods. My previous simulations yielded perfectly fine results however. Many thanks in advance and best regards, Luuk fvSolution: Code:
solvers Code:
ddtSchemes Code:
thermoType |
Try to decrease the relaxation factor for
"(U|T|k|epsilon|R)" 1; to about 0.3; |
Quote:
I have found something strange that could be the cause of the differences though. It seems that buoyantPimpleFoam and buoyantBoussinesqPimpleFoam use different dimensions for the p and p_rgh fields: bBPF uses [0 2 -2 ... ] and bPF uses [1 -1 -2 ... ]. I don't really understand this difference in definition, which makes it hard to compare. Changing the dimensions in bPF to those used in bBPF causes the solver to fail, as can be expected. I've also noticed that the values of the internal fields for U, p and p_rgh differ greatly between bPF and bBPF after one timestep. bPF yields much higher U values (resulting in a higher Courant number), and the difference in definition of the pressure fields is of course persistent throughout the simulation. Also, the values of p_rgh in bPF vary slightly more than in bBPF. I'm suspecting that all of these differences are correlated but I'm having a hard time keeping a clear view of what is what. Can anybody tell me what is going on or where I should look to find out? Again many thanks in advance and best regards! Luuk |
"bBPF uses [0 2 -2 ... ] and bPF uses [1 -1 -2 ... ]"
In the first case, the [0 2 -2 ...] you need to divide your Pressure values in Pascals by the value of density and you will obtain the correct value. In the seconds case, you need no calculations and you can use here you Pressure values in Pascals |
Quote:
Also, if this is true, I would still like to compare with my previous simulations in bBPF. Is perfectGas a good way to compare with the Boussinesq approximation or should I use another entry for equationOfState? Many thanks! Luuk EDIT: It seems I was wrong. Setting equationOfState to perfectGas only fixes the high Courant value for a number of timesteps. After a while the values still increase and the timesteps converge towards a floating point exception... I'm still thinking the problem lies somewhere within the density settings. Any clues? |
Hi again guys,
I've printed out the density values as a scalar field and everything seems to be fine. I was expecting that uniform density would imply no buoyancy and therefore a uniform zero velocity field. The solver solves for the gradient in p_rgh though, which is of course nonzero. The velocity values I end up with are quite high as I said before. Can anyone tell me if my reasoning is incorrect and why? Many thanks! |
All times are GMT -4. The time now is 05:04. |