Am I doing this right?
I am trying to solve the Euler equations for flow around a sphere. I have a small sphere, call is obstacle inside a big sphere, the domain. There are only two patches. obstacle, farfield. I am not able to solve a supersonic flow in this problem. Here are my settings :
I am using the sonicFoam solver.
ddt Euler; grad Gauss ; div gauss upwind; laplacian gauss corrected; interpolation linear ; sngrad corrected; fluxrequired yes;
fvsolution: has P, U, rho, e
Thermo and transport: mu = 0. I have used R and gamma - atmospheric values.
p- obstacle-zerograd, farfield 1bar. internal field uniform 1 bar
U- obstacle- uniform(0 0 0), farfield- supersonicFreestream with pInf 1 bar, T 300, UInf (650 0 0 ), gamma 1.28 value (650 0 0)
T- obstacle zerograd, farfield inlet outlet with inletvalue and vlaue 300 k, internal field 300K.
I hope this explains all that I have set. Please suggest me what my mistake could be.
I have written an Euler solver myself that can solve this problem. Where I used farfield that uses the flux direction. Thank you
I tried with different pressure boundaries
I am still trying on this. I changed the pressure boundary at the outer boundary to wave transmissive. Still blow up. I tried smaller time steps too. When I look at the intermediate results, there is velocity coming in from all directions. How is that possible, when I have set the inlet value to (650 0 0) ?
Humm...I think it blew up because there is no "outflow" in your velocity setting. I have no clue how to fix it for supersonic inflow, though. If it's subsonic, I think you can just use inletoutlet (I'm not sure of the name) so the flow going out would go out instead of rebounding back. Just a quick guess, hope it'd help.
But I had tried the inletoutlet on the velocity field. let me keep trying though.
I need to ask a question about the grad of a scalarfield. I derived an analytical solution for volVectorField H and I need to calculate the f_w=\nabla(H^2).
I tried with volVectorField f_w=fvc::grad(H&H) but it does not match with analytical solution. Please can you tell me how I can calculate this in OpenFOAM.
I think you should modify your boundary conditions. The "Theory of characteristics" tells that for a supersonic inlet there must be specified 4 out of 5 unknowns. The usual variables specified at the inlet: total temperature, total pressure and 2 velocity components; the rest will be computed from inside the domain (using zeroGradient for instance). At the supersonic outlet, only one unknown has to be specified, and it is usually the static pressure (for the rest you can use zeroGradient again).
I hope this will help you,
|All times are GMT -4. The time now is 21:24.|