|
[Sponsors] |
[isoAdvector] Correct isoAdvector/interIsoFoam/InterFoam BCs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 14, 2017, 09:30 |
Correct isoAdvector/interIsoFoam/InterFoam BCs
|
#1 |
New Member
Join Date: Aug 2017
Posts: 10
Rep Power: 9 |
Hello everyone,
hopefully someone can help me with the boundary conditions for the interIsoFoam - which should be the same as for interFoam... In the picture you can see a simple testcase, where water is flowing through a box. But there must be some error in the BC which occurs, if there is a really small droplet at the bottom of the box. Sometimes there is a single cell with really high pressure and a really high velocity and the simulation crashes... My BCs are: alpha.water Code:
inlet { type zeroGradient; } outlet { type zeroGradient; } bottom { type dynamicAlphaContactAngle; theta0 80; thetaA 90; thetaR 50; uTheta 0.01; limit zeroGradient;//gradient; value uniform 0; } waterInlet { type fixedValue; value 1; } top { type zeroGradient; } "front|back" { type dynamicAlphaContactAngle; theta0 80; thetaA 90; thetaR 50; uTheta 0.01; limit zeroGradient;//gradient; value uniform 0; } Code:
inlet { type fixedValue; value uniform (15 0 0); } outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } bottom { type fixedValue; value uniform (0 0 0); } top { type fixedValue; value uniform (0 0 0); } waterInlet { type fixedValue; value uniform (0 0 0.02); } "front|back" { type zeroGradient; } Code:
inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } bottom { type fixedFluxPressure; value uniform 0; adjoint no; } waterInlet { type fixedFluxPressure; value uniform 0; adjoint no; } top { type zeroGradient; } "front|back" { type fixedFluxPressure; value uniform 0; adjoint no; } Thanks in advance! |
|
November 29, 2017, 04:53 |
|
#2 |
Member
Johan Roenby
Join Date: May 2011
Location: Denmark
Posts: 93
Rep Power: 21 |
Hi schf
Try to send med the case including an Allrun script so I can see exactly what you are doing. Please also let me know which version of OpenFOAM you are using. Kind regards, Johan.Roenby [at] gmail.com |
|
November 30, 2017, 09:51 |
|
#3 |
New Member
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9 |
hello roenby,
see the attached case. Steps to reproduce the problem with OpenFOAM-v1706: ./Allrun run the simulation for ~0.025s. If you look at the residuals with pyFoam, you can see the problem starts at ~0.017s. reconstruct the case -> sometimes these high velocities occur. But not in each timeStep My guess is, that it's a problem with the pressure equation. Due to the surface tension there is a high pressure inside the droplet and somehow this causes the problem. Could this problem be linked with your outlook here at page 40?: roenby.com/postdoc/wp.../01/OceanFOAM2016_Roenby.pdf Did you have time to work on this inconsistency of the pressure handling? Or is it up to me or somebody else to fix it? Best regards FSchi |
|
November 30, 2017, 17:34 |
|
#4 |
Member
Johan Roenby
Join Date: May 2011
Location: Denmark
Posts: 93
Rep Power: 21 |
Hi schf/Fschi (Schilling?)
I had a look at your case. So you are simulating a 5 cm section of a 2 cm wide channel with a air flow of 16.67 m/s through it. At the bottom of the channel you have an orifice of diameter ~ 0.5 cm from which water is flowing up at around 3 cm/s. And you want to know how this water is blown with the wind down along the channel. Right? I'd guess that a substantial fraction of the force that the air exerts on the water will be in terms of tangential shear stress along the interface. You should be aware that this shear stress is only properly calculated if you actually resolve the air and water boundary layers at the interface, which would require a VERY fine resolution. Besides from that let me ask you a couple of questions: Are you sure the problem with intermittent high velocities (I get U ~ 100 m/s in single cells) is related to your BC's? Why? Does it work with other BC's than the ones you listed? Does the simulation run without problems with interFoam? And if so, do you also get those ~1 cell size droplets running along the channel floor with interFoam? Are such droplets expected physically? As stated elsewhere, the current surface tension implementation in interFoam is likely to dislike the sharper interface created by isoAdvector - especially with small and highly underresolved droplets as you get in your simulation (droplet diameter ~ dx ~ 0.2 mm). My guess would be that with interFoam and MULES, droplets of size ~dx released from the waterInlet will immediately dissolve into "numerical vapor". In that way the diffusivity of MULES helps you in terms of stability even though the numerically created vapor is not physical. To verify that the intermittent very high velocities are caused by surface tension you could try to rerun with surface tension set to 0 in transportProperties. I don't know if it will solve anything but by my experience it is also good practice to run with p_rghFinal tolerance 1 or 2 orders of magnitudes under surfCellTol. You currently run with p_rghFinal tolerance = 1e-6 and surfCellTol = 1e-8. Also note that there is a patch for isoAdvector on https://develop.openfoam.com/ (commit ea173eea) correcting a small bug that sometimes led to crashes. Here are some other things you could try: What happens if you use PCG instead of GAMG for p_rgh and p_rghFinal instead of GAMG? What happens if you use Euler instead of CrankNicolson 0.5 for ddtSchemes in fvSchemes? It seems you are running with no-slip and no wall functions or any attempt to resolve boundary layers at sides and bottom. You could also try to run with slip here. Kind regards, Johan |
|
July 26, 2018, 10:52 |
|
#5 |
New Member
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9 |
correct and thanks for your help!
First I want to apologize for this (very) late response. I had to work on other things so I didn't have the time to investigate your ideas... Yes you described the case correct. I don't know if it's interesting to you anymore, but here a short description of the results now (with the newest OpenFOAM-dev and isoAdvector): - I don't get this high velocities anymore, so this problem seems to be solved - I get very similar results with GAMG and PCG - with surface tension set to 0 there are no spurious currents - with surface tension there ist the problem of spurious currents (see attached images). These images are a top view of the water outlet and you can see the spurious currents forming. maxAlphaCo = 0.2 and dx~0.125mm As far as I understand this problem isn't solved yet. So if I change dx or dt they still could appear, correct? |
|
August 2, 2018, 05:21 |
|
#6 |
New Member
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9 |
Please ignore the last part of the last post. It's a problem of the dynamicAlphaContactAngle BC solved in OpenFoam 6 (https://bugs.openfoam.org/view.php?id=2864)
To get the expected behaviour the change from thetaA/thetaR to thetaAdv/thetaRec does the trick. If not, the receding contactAngle is higher than the advancing contactAngle... |
|
February 6, 2019, 11:09 |
|
#7 |
New Member
Max
Join Date: Feb 2017
Posts: 11
Rep Power: 9 |
Hi Fschi
please i need your assistance, the result of my simulation is the result pdf file, i do not know how to figure out what's wrong. i will add the others file y can have look on my settings. i used interFoam instead of interIsoFoam from openfoam-extend. please any suggestion is welcome Best Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegionSimpleFoam: inconsistency between BCs and results | Diro7 | OpenFOAM Running, Solving & CFD | 1 | March 2, 2017 05:36 |
Interpolation Error on FAM Mesh with Cyclic BCs | ngj | OpenFOAM Bugs | 1 | August 9, 2011 07:12 |
strange turbulent BCs work | marine | OpenFOAM | 3 | June 14, 2010 09:41 |
The correct BCs for defining an "open room". | suitup | OpenFOAM | 3 | March 8, 2010 15:32 |
Wall BC's for a NS solver | André Burdet | Main CFD Forum | 6 | December 8, 2000 22:45 |