|
[Sponsors] |
August 17, 2016, 11:58 |
BC waveTransmissive in sonicLiquidFoam
|
#1 |
New Member
Philipp Paul
Join Date: Aug 2016
Posts: 1
Rep Power: 0 |
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 |
|
June 7, 2018, 20:48 |
|
#2 |
New Member
Francisco
Join Date: Sep 2017
Posts: 1
Rep Power: 0 |
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 |
|
September 25, 2018, 09:33 |
|
#3 |
New Member
|
||
October 26, 2018, 04:07 |
|
#4 |
New Member
Johannes Voß
Join Date: May 2018
Posts: 13
Rep Power: 8 |
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 ); Code:
dimensions [0 -2 2 0 0 0 0]; internalField uniform 7.345441265e-06; boundaryField { ".*" { type zeroGradient; } } 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 |
|
December 2, 2018, 10:50 |
|
#5 |
New Member
Sam
Join Date: Feb 2018
Posts: 6
Rep Power: 8 |
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 |
|
December 3, 2018, 05:51 |
|
#6 |
New Member
Johannes Voß
Join Date: May 2018
Posts: 13
Rep Power: 8 |
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; } } 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; } ); } 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 |
|
Tags |
sonicliquidfoam, water hammer, wavetransmissive |
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |