# Am I doing this right?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 18, 2009, 08:01 Am I doing this right? #1 Senior Member   Prapanch Nair Join Date: Mar 2009 Location: Bangalore, India Posts: 105 Rep Power: 9 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. fvSchemes: 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. 0: 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

 March 19, 2009, 00:39 I tried with different pressure boundaries #2 Senior Member   Prapanch Nair Join Date: Mar 2009 Location: Bangalore, India Posts: 105 Rep Power: 9 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) ?

 March 19, 2009, 03:25 #3 Member   John Wang Join Date: Mar 2009 Location: Singapore Posts: 72 Rep Power: 9 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.

 March 20, 2009, 02:00 #4 Senior Member   Prapanch Nair Join Date: Mar 2009 Location: Bangalore, India Posts: 105 Rep Power: 9 Thank you, But I had tried the inletoutlet on the velocity field. let me keep trying though.

 March 23, 2009, 07:43 #5 New Member   adil mardionglu Join Date: Mar 2009 Location: waterford, Ireland Posts: 4 Rep Power: 9 Hi everone, 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. regards adil Regards

March 23, 2009, 08:47
#6
Senior Member

Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 12
Quote:
 Originally Posted by prapanj I am trying to solve the Euler equations ... to solve a supersonic flow... Here are my settings : I am using the sonicFoam solver. fvSchemes: 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. 0: 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.
Hello Prapanj,
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).

Dragos

 Tags euler, farfield, supersonic

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT -4. The time now is 08:05.