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

BC waveTransmissive in sonicLiquidFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2016, 11:58
Default BC waveTransmissive in sonicLiquidFoam
  #1
New Member
 
Philipp Paul
Join Date: Aug 2016
Posts: 1
Rep Power: 0
philferdinand is on a distinguished road
Dear FOAMers,

My goal is to simulate a pressure wave (water hammer) on a guide vane in a stream channel (to eventually calculate the lift and drag forces on that guide vane). I have little to no experience with compressible solvers but sonicLiquidFoam (OF V3.0.0) seemed like the right choice given that the tutorial deals with a water hammer and that it is actually suitable for water as a fluid.

So my idea is to simulate the flow around the guide vane with a given velocity (to know the lift and drag in normal operation) and then at one point to increase the inlet pressure at the inlet to simulate the arriving pressure wave.

The problem is that I can not get a steady state flow around the turbine blade since the initial pressure field that builds up around the blade creates a pressure wave which oscillates in the channel and can't exit on any of the boundaries (neither inletOutlet nor zeroGradient for the outlet let the pressure exit).

I would like the pressure waves to exit through In- and Outlet without reflecting and found the waveTransmissive boundary condition. Anyhow this BC does not seem applicable in sonicLiquidFoam, since there is no psi field written.

This here (http://www.cfd-online.com/Forums/ope...oam-crash.html) gave me the idea that I could add a psi field to the setFields.C, since psi is actually set in the thermodynamicProperties, but it doesn't seem to be that easy.

Does one of you have an idea how to:

a) how to implement the waveTransmissive BC in sonicLiquidFoam OR
b) what other BC would let the pressure waves pass OR
c) which other solver would be better suited for the problem

I thank you very much for your help and hope that I have formulated my question adequately

guideVane.jpg
philferdinand is offline   Reply With Quote

Old   June 7, 2018, 20:48
Default
  #2
New Member
 
Francisco
Join Date: Sep 2017
Posts: 1
Rep Power: 0
fjimenez is on a distinguished road
Hi Philipp,

I know this thread is a little bit old but I was wondering if you managed to find a solution to your problem since I am facing a similiar one.

Cheers
fjimenez is offline   Reply With Quote

Old   September 25, 2018, 09:33
Default
  #3
New Member
 
Anil Istanbullu
Join Date: Sep 2018
Location: Istanbul
Posts: 6
Rep Power: 8
anil.istanbullu is on a distinguished road
Send a message via Skype™ to anil.istanbullu
Quote:
Originally Posted by fjimenez View Post
Hi Philipp,

I know this thread is a little bit old but I was wondering if you managed to find a solution to your problem since I am facing a similiar one.

Cheers
Is there any suggestion for such case (water hammer)?
anil.istanbullu is offline   Reply With Quote

Old   October 26, 2018, 04:07
Default
  #4
New Member
 
Johannes Voß
Join Date: May 2018
Posts: 13
Rep Power: 8
J.H.59 is on a distinguished road
You could try to use "acousticDampingSource" to damp everything outside of your physical domain. The problem is that you need fvOption to do that which isn't considered in "sonicLiqidFoam".

What I did was to compare a solver which has fvOption (e.g. rhoPimpleFoam) and the sonicLiquidFoam code and to change the code so that I can use fvOption.
After that I'm able to use "acousticDampingSource" and it works fine as far as I can tell.


Another option is to change the code of "sonicLiquidFoam" so that you can use the "waveTransmissive" BC. I was able to do that but the reflected part is still higher than in other solvers (again e.g. rhoPimpleFoam), so I'm not sure if this is enough for you or even right.
The problem in "sonicLiquidFoam" is that it can't use psi in the BC even though it is read in. I just created a new field in "createFields.H" like


Code:
volScalarField psi0
(
    IOobject
    (
        "psi0",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);
You then have to include "psi0" as a file in the "0" folder like


Code:
dimensions      [0 -2 2 0 0 0 0];

internalField   uniform 7.345441265e-06;

boundaryField
{
    ".*"
    {
        type            zeroGradient;
    }

}
so that psi is constant everywhere. Then you can use this value in "waveTransmissive" with psi0.
Like I said I'm not 100% sure that this works like it should but I can simulate my case with this.


I hope this helps somehow


Best regards
Johannes
J.H.59 is offline   Reply With Quote

Old   December 2, 2018, 10:50
Default
  #5
New Member
 
Sam
Join Date: Feb 2018
Posts: 6
Rep Power: 8
xevious is on a distinguished road
Hey J.H.59,


Can you please elaborate more on the "acousticDampeningSource" method? I am currently trying to use waveTransmissive Bc in rhoPimpleFoam, and i keep getting reflections that destroy my solutions. I would like to try the fvOptions method you used, if you could share that with me.


Thanks
xevious is offline   Reply With Quote

Old   December 3, 2018, 05:51
Default
  #6
New Member
 
Johannes Voß
Join Date: May 2018
Posts: 13
Rep Power: 8
J.H.59 is on a distinguished road
Hi Sam,


it depends on your problem which one you should use. If you have a simple periodic inlet wave and a big enough domain you should have no problems with waveTransmissive. But the reflection strongly depends on the chose of lInf! This value needs to be far enough from the boundary. In my experience this can be some wavelength. You should also considerthat this results in non physical solutions near the boundary.

If you have a domain which is only some wavelength big this can be more complicated. There you could choose a combination of both methods.
The fvOptions file can look like:

Code:
acousticDampingSource
{
    type            acousticDampingSource;
    active          yes;
 
    acousticDampingSourceCoeffs
    {
        timeStart        1e-10;
        duration         1000.0;
        selectionMode    all;
        centre           (-2.5e-4 0 0);
        radius1          3e-4;
        radius2          4e-4;
        frequency        1e+07;
        w                3;
        URef             UMean;
    }
}
This creates two spheres around the centre with the radius radius1 and radius2 where till the first one nothing is damped, from the first to the second one the damping is increasing and after the second one the damping is reaching his maximum which is chosen by "w". What is nice is that the two spheres doesn't have to be completely in the domain.
Another thing you need is to calculate UMean every timestep. To do this you need to add the lines in controlDict:
Code:
    fieldAverage
    {
        type            fieldAverage;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;
        fields
        (
            U
            {
                mean        on;
                prime2Mean  off;
                base        time;
            }


        );
    }
My problem with this method is that you need to activate it after one timestep (that is why timeStart is not zero) because this method needs a UMean value to work. And in the 0 folder you don't have this. If you want to start the solver after some time again you need to update the timeStart to latestTime + deltaT.
At least I did not find a better solution.
Another thing to have in mind is that by a too strong damping you also get reflections. So you have to damp the flow slowly over some way like you can see in the documentation
https://www.openfoam.com/documentati...c-damping.html
where it is damped over some periods.
I hope this helps you to solve your problem. If you have some more questions feel free to ask.

Best regards
Johannes
J.H.59 is offline   Reply With Quote

Reply

Tags
sonicliquidfoam, water hammer, 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
wavetransmissive boundary for pressure and velocity SanchoPanza OpenFOAM 5 June 29, 2021 07:48
waveTransmissive steadyState error sino75 OpenFOAM Pre-Processing 6 March 9, 2015 09:01
OpenFOAM: MRFSimpleFOAM with waveTransmissive hm86 OpenFOAM Running, Solving & CFD 1 October 12, 2014 02:17
waveTransmissive: does fieldInf fix static or total pressure? Intrepid OpenFOAM Pre-Processing 0 March 31, 2014 13:15
compressibleInterFoam versus sonicLiquidFoam supvika OpenFOAM 0 January 21, 2011 20:16


All times are GMT -4. The time now is 07:42.