CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Non-Reflective Boundary Conditions are reflective at outflow (rhoCentralFoam)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2021, 08:37
Default Non-Reflective Boundary Conditions are reflective at outflow (rhoCentralFoam)
  #1
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Dear All,

I'm running a CFD campaign in OpenFOAM(v7) as part of my master's thesis. Overall I have a relatively fast, mild cell count simulation that can ramp across a range of Mach numbers to characterise the starting/hysteresis that occurs in Busemann-Biplane type supersonic airfoils. I'm varying airfoil parameters of spacing and stagger through a MATLAB batch script to build up my design space, and the simulation itself ramps through speeds and logs force coefficients.

So far sims have been going well (see image1, simulations from within a circular domain, varying AoA), however recently I've tried to simulate some lower Mach numbers (starting Ma 1.2) - where a large bowshock is formed which is able to reach the outflow in a subsonic state. This has lead to frustrations with boundary conditions that are not meant to be reflective i.e. zeroGradient & waveTransmissive acting as if they were walls too (see image 2,2a). I've also thought of improving the mesh to a D-Mesh, but the introduction of two more outflows which are acting as walls has not helped (see image3).

OpenFOAM is a great library, and I've looked around various forums & wiki's and think the problem may lie in either:
  • - rhoCentralFoam's formulation as a solver for hyperbolic i.e. supersonic flows which means it is not well suited to mixed-transonic flows (I don't think this is quite the case, as a fully subsonic simulation with waveTransmissive inflow & outflow works)
  • - zeroGradient and/or waveTransmissive boundary conditions being ill suited to mixed subsonic-supersonic flows i.e. when the outflow contains flow of characteristics that can transmit information upstream

I'd appreciate any advice/help that the community could give on this issue, if I can't get the lower Machs working i'll probably focus on gettign results for those speeds which can provide a supersonic outflow (Ma 1.4+).

Many thanks in advance,
Tom, Imp. College

PS. May be of use a brief overview is available here: https://www.researchgate.net/publica...FOAM_An_Update
Attached Images
File Type: png image1.png (136.5 KB, 158 views)
File Type: png image2.png (106.5 KB, 147 views)
File Type: png image2a.png (102.1 KB, 120 views)
File Type: jpg image3.jpg (40.4 KB, 110 views)
Tjcross31 is offline   Reply With Quote

Old   May 19, 2021, 23:42
Default Why not freestream?
  #2
New Member
 
Nivarthi Siddhartha
Join Date: Apr 2017
Location: India
Posts: 3
Rep Power: 9
n_sid1994 is on a distinguished road
Hi,
I wonder why you cannot replicate the same boundary conditions as in tutorial problems, freestream? I'd love to know if you have solved the issue already.
Thank you
Sid
n_sid1994 is offline   Reply With Quote

Old   May 20, 2021, 12:49
Default
  #3
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Hi,


can you share your BCs? I think the problem is the linf in your waveTransmissive-BC.
shock77 is offline   Reply With Quote

Old   May 22, 2021, 12:36
Default
  #4
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Hi sid, Shock,

Many thanks for your replies!

sid
I had a look a a couple of the rhoCentralFoam tutorials (on v7), the wedge case uses zero-gradients on the top that also strangely act like walls, and a waveTransmissive on the top also seems to act like this (reflecting the Oblique shock like a tunnel wall). I had a brief look at freestream type boundary conditions but was unsure how to implement them in my case. I couldn't find a suitable tutorial for either a supersonic freestream airfoil with these mixed outflows or a shock-diamond exhaust type - would be appreciative of a link to a case like this?

Thus far in my research i'm just starting the simulations a little higher (Ma 1.4 where there is a weak Oblique solution and hence no pesky subsonic flow)

Shock
I thought similar - there is a great sub here on the influence of lInf (l Inf in wave transmissive bc)

Quote:
Originally Posted by Gatoscar View Post
Hello there

I did my own tests to understand the behaviour of lInf in the waveTransmissive BC. I took the wedge example in the rhoCentralFoam solver and used Ma=2.0. Keeping everything fixed I only modified the value of lInf (the results can be seen in the attached images. The image file name is the value given i.e. plInf10e-2 means lInf=10e-2). The way I understand for values lInf>1 the far-field condition is outside of the domain, for values lInf>1 the far-field condition is inside the domain. I did tests whit values grater than 1 (lInf=10e2 and lInf=10e3), but the results were the same that lInf=10e0.

Regards
Current BC's are slip on the airfoils (inviscid sim), uniform inflow at a ramping Mach number and zeroGradient almost everywhere and for temperature (that works & adiabatic). Notably in pressure I have:

Code:
    inlet
    {
        type            waveTransmissive;
        field           p;
        psi             thermo:psi;
        gamma           1.4;
        fieldInf        1; //far-field value
        lInf            4; //how far away far-field is
        value           uniform $pressure; 
    }
Code:
    outlet
    {
        type            waveTransmissive;
        field           p;
        psi             thermo:psi;
        gamma           1.4;
        fieldInf        1; //far-field value
        lInf            4; //how far away far-field is
    }
lInf is in my case the domain radius (in chords?) should probably be a bigger value... I appreciate i'm using a quite truncated domain also! One suggestion i've got from elsewhere is to use a Perfectly Matched Layer?

Would appreciate thoughts! I've uploaded the blank case here if that helps at all: https://github.com/Tjcross31/blank_foamcase
Tjcross31 is offline   Reply With Quote

Old   May 22, 2021, 12:42
Default
  #5
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Hi,

Why would you set the pressure to 1 Pa? This is not continuum Flow that way. I suppose that is the problem.
shock77 is offline   Reply With Quote

Old   May 22, 2021, 13:07
Default
  #6
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Hi Shock,
Ahah i'll explain this one - this is a trick used a fair amount (see the wedge tutorial), we use a non-dimensionalised gas species of gamma=1.4 such that at Pressure 1, Temperature 1 and Velocity 1 the Mach number is 1 - note that this in invariant on the units system used... 1 could be 1Pa, 1Psi or the ratio of the inflow pressure i.e. P_inflow = 1*P_inflow at inflow Thus we see that the velocity field is also the Mach number field and the pressure and temperature fields are the ratio of the respective increase in these variables, a key part of supersonic analysis.

The adjustment is made in constant/thermophysicalProperties note the line:
molWeight 11640.3;
for regular air this is about 28, we scale such that we get the desired result. Think of it like dynamic similarity. As we are still modelling continuum flow we can do this without consequence, see here: https://develop.openfoam.com/Develop...icalProperties
Tjcross31 is offline   Reply With Quote

Old   May 22, 2021, 13:15
Default
  #7
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
What is the goal of doing that? In my opinion it may seem mathematically correct, but I would say its not physical. Besides your viscosity is definitly wrong.

The tutorials are often not physical.
shock77 is offline   Reply With Quote

Old   May 22, 2021, 13:51
Default
  #8
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Hi Shock,

As this is an inviscid simulation campaign there is by definition no viscosity - in that way of course things are slightly 'wrong', real flows are almost always viscous, but for aerodynamic and phenomena modelling we can get away with using models based on the Inviscid Euler equations, which is the case here.

Physically we care about shock structures around these biplanes, which has been shown (http://pop.h-cdn.co/assets/cm/15/06/...lane_Jpass.pdf) to be mildly invariant of viscous boundary layer effects, so we use laminar simulations, for a variety of reasons

The end goal of the project is evaluating some aspects of the airfoil geometry to see if there can be aerodynamic savings etc. I attached a link to the project in the first post, and have a fair amount of validation data to believe that the simulation setup (non-dimensionalised gas species etc.) is within those previous research efforts that have used alternative Euler or NS solvers: https://www.researchgate.net/publica...FOAM_An_Update

While the tutorials may not be 100% representative of the real physics they model key fluid dynamic principles i.e. oblique shocks and supersonic flow effects. The understanding we extract is limited by our assumptions of course, here we get what we need: the shock angles, pressure and density rises and resultant force coefficients

I've attached the case in my previous post, you are more than welcome to change out the gas species, and set the biplane off at atmospheric conditions of 40,000ft, but you'll be performing pressure rise calculations manually afterwards rather than having the field variables show you these directly

Thoughts are appreciated
Tjcross31 is offline   Reply With Quote

Old   September 14, 2021, 01:18
Default
  #9
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9
taaresh01 is on a distinguished road
Hi Tjcross31,

I have a similar issue with my own reacting-flow, fully compressible solver that I've built off of rhoCentralFoam. I have a square domain where gas leaves from all four sides due to ignition led expansion in the center. I have currently set these 4 outflows with waveTransmissive BCs for pressure. Since these are subsonic outflows, changing Linf does not make a difference, and I get undesirable reflections off the outflows.

Could you let me know if you were able to fix the issue, and how?

Thanks,
Taaresh
taaresh01 is offline   Reply With Quote

Old   September 14, 2021, 11:01
Default
  #10
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Hi Taaresh,

Thanks for reading this thread, and I'm sorry you're having a similar issue. Sadly I wasn't able to resolve this or find a fix before the end of the project - but feel a little less alone in the undesirable reflections.

The only possible avenue I think which may be better is to look at something like partially matched layers or some kind of artificial damping layer on the very outside of the domain - but it is mildly frustrating that this issue remains!

Let me know if you fix this in the future, if not perhaps it's just one of the mysteries of the universe
Tjcross31 is offline   Reply With Quote

Old   September 14, 2021, 13:07
Default
  #11
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9
taaresh01 is on a distinguished road
Thomas,

No worries. I think there's always the option of coding up the semi-implicit, characteristic BC for subsonic outflows, which can hopefully resolve this (I did this is one of my course projects and it worked there). I was just looking for options that are already available in OF for now. I was hoping that the waveTransmissive BC would do exactly this. I'll let you know if I can fix it.

Thanks,
Taaresh
taaresh01 is offline   Reply With Quote

Old   September 15, 2021, 04:50
Default
  #12
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Can you share your exact boundary conditions and explain why there are shocks in a subsonic flow?


I assume the shock reflects at your waveTransmissive boundary condition, because the farfield value of the pressure, which is used to calculate the boundary properties, is set too high.
shock77 is offline   Reply With Quote

Old   September 15, 2021, 05:08
Default
  #13
New Member
 
Thomas Cross
Join Date: Mar 2021
Posts: 8
Rep Power: 5
Tjcross31 is on a distinguished road
Hi Shock,

Unsure if your question was in response to my post or Taaresh's (Where i'm assuming it was shockless or just a combustion front, where the pressure waves generated were reflecting as if off a wall rather than exiting the domain).

If it were in response to my original query the exact boundary conditions are both listed above and in the case file (https://github.com/Tjcross31/blank_f...ank_foamcase/0). Shocks are present here as we are typing to simulate external supersonic flow, the presence of an object in the flow leads to shocks, some of which are strong enough to slow post-shock flow to subsonic conditions, causing this mixed outflow.

The farfield pressure value was set to be the same as the ambient conditions at the inlet, which represent the air that's being travelled through, at speed in the absence of any shock-influence
Tjcross31 is offline   Reply With Quote

Old   September 15, 2021, 09:25
Default
  #14
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
It was a response to taaresh01's post.


In your case I do not know what exactly you did during your nondimensionalization. The tutorials in openfoam are not physical, as you said yourself. I cant tell how the waveTransmissive BC reacts on this step.


I think the benefit of nondimensionalization for cfd is that the numbers are equally big. Otherwise you have Pressure which ware 10^5 and velocites that might be only 10^1 and so on. There is a statement for that, but I have forgotten it. There are several benefits to do that with solvers.


But openfoam itself is dimensional. I cant tell whether your procedure is ok or not. The solver is written in dimensional form and I dont think you can just adjust the molWeight and make it nondimensional. But as I said, I am no expert.
shock77 is offline   Reply With Quote

Old   September 25, 2021, 17:47
Default
  #15
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9
taaresh01 is on a distinguished road
Hi, Sorry for the tardy reply. I was able to fix it, actually.

Firstly, I don't think the advective BC (or waveTransmissive BC which just overloads the advectionSpeed function) is exactly based on Poinsot and Lele's work of approximating flow as locally inviscid and 1D at the boundaries. Instead, OF simply solves the 1D advection equation for any field that this waveT BC is applied to, and with a wave speed calculated by advectionSpeed(), which is u for advective BC and u-c for waveT BC.

Having said that, I think this method also suffices in most cases to avoid reflection. The key is to use this BC for ALL the variables. I was earlier using it only for pressure, but kept the velocity as inletOutlet and temperature (and mass fractions in my custom solver) as fixedValue only. But when I shifted to using waveT for all the variables, it worked like a charm. Please check these videos showing the effect of boundary reflection, and how it got handled by using waveT BC for all variables.

Also, I set lInf to 0.01 m, since my domain itself was a square of side 0.005 m. And I set the expected far-field values of temperature and pressure to the respective fieldInf variables.

https://drive.google.com/file/d/1802...ew?usp=sharing
taaresh01 is offline   Reply With Quote

Old   September 25, 2021, 18:00
Default
  #16
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9
taaresh01 is on a distinguished road
@shock77

I have a flow where M ~ 1.05 after a plasma pulse ends, but then the energy quickly decays in the form of acoustic waves as it exits the domain.
taaresh01 is offline   Reply With Quote

Old   October 1, 2021, 04:45
Default
  #17
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Hi taaresh01,


I usually set p and U to waveTransmissive. Actually I havent tried to set T to waveTransmissive.


Glad you found a solution!
shock77 is offline   Reply With Quote

Reply

Tags
boundary condition, busemann biplane, rhocentralfoam, wavetransmissive


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 22:16
Low torque values on Screw Turbine Shaun Waters CFX 34 July 23, 2015 09:16
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28


All times are GMT -4. The time now is 14:53.