
[Sponsors] 
Need help with boundary conditions: open to atmosphere 

LinkBack  Thread Tools  Search this Thread  Display Modes 
April 11, 2011, 06:51 
Need help with boundary conditions: open to atmosphere

#1 
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 
Hi all,
after trying a lot of different setups, it seems that I need some help with the boundary conditions of my problem. I think posting the entire setup here is much too long, so I'm going to attach the whole zipped case. The setup is as follows, I attach a picture of that in the end. The case is two dimensional and I have two regions, which gives two meshes. It can be described as a sqare with an annulus in the middle. The annulus is rotating with constant speed and has a fixed temperature of 473K. In the middle of the annulus, there's nothing. The surrounding square is filled with air as fluid, only the bottom is considered a wall, left, right and top are open to atmosphere. The fluid has initially a temperature of 300K and I want air that is sucked into the domain to have 300K too. There is no specific inlet or outlet. The only kinematic component of the case is rotation of the annulus. I implemented this, by simply setting a rotatingWallVelocity in the fluid/U file. No mesh movement or the like. So far, temperature coupling works very well. Considering velocity and pressure, I've got a lot of different results, depending on the boundary conditions. Some results show nearly stable situations, but have strange distortions every now and then. Some results show even more stable situations, but then the simulation explodes suddenly (20% of the solvers log is taken by the last 0.5% of the time simulated). Some of the boundary conditions I considered to be appropriate give strange results, while others which at first don't seem right, produce better results... I'm stuck with too much different setups that I tried... So here is, what it should look like: (example for a nearly stable solution, but disturbed every now and then) Yes, I'm looking for a stable (steady state?) solution, but want to calculate time dependent stuff, so I chose chtMultiRegionFoam as solver. I think, there's nothing wrong with that choice and my problem is only related to boundary conditions... ...to be continued...
__________________
CAELinux 2010  OpenFOAM 1.7 Last edited by Wolle; April 11, 2011 at 09:35. 

April 11, 2011, 07:21 

#2 
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 
Okay, just to give an example, here's a summary of the basic setup for the case which I took the screenshot of...
Remarks: My solid is called "GAL" in my case, fluid is named "FLUID_AMB". I left the comments in the case setup files by intention... With respect to the FLUID_AMB/0/U settings of inletOutlet, I want to explain, that this is just an idea and only one of various combinations I tried. Giving well defined velocity BCs seem to produce far more stable results, although I wanted to have zero (or pressure calculated) inlet velocity... Solver: chtMultiRegionFoam System settings Fluid: system/FLUID_AMB/fvSchemes Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss upwind; div(phiU,p) Gauss linear; div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div((muEff*dev2(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear limited 0.333; laplacian((rho*(1A(U))),p_rgh) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; laplacian(DREff,R) Gauss linear limited 0.333; } interpolationSchemes { default linear; } snGradSchemes { default limited 0.333; } fluxRequired { default no; p_rgh; } Code:
solvers { rho { solver PCG preconditioner DIC; tolerance 1e7; relTol 0; } p_rgh { solver GAMG; tolerance 1e7; relTol 0.01; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } p_rghFinal { solver GAMG; tolerance 1e7; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0; } h { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0.1; } hFinal { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0; } k { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0; } epsilon { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0; } R { solver PBiCG; preconditioner DILU; tolerance 1e7; relTol 0; } } PISO { momentumPredictor off; nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 1; pRefPoint (0.081 0.0257 8.01); pRefValue 1e5; } PIMPLE { momentumPredictor on; nCorrectors 2; nNonOrthogonalCorrectors 0; } relaxationFactors { h 1; U 1; } system/GAL/fvSchemes Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; } laplacianSchemes { default none; laplacian(K,T) Gauss linear limited 0.333; } interpolationSchemes { default linear; } snGradSchemes { default limited 0.333; } fluxRequired { default no; } Code:
solvers { T { solver PCG; preconditioner DIC; tolerance 1E06; relTol 0; }; } PISO { nNonOrthogonalCorrectors 1; } PIMPLE { nNonOrthogonalCorrectors 1; } Fluid constant/FLUID_AMB/g Code:
dimensions [0 1 2 0 0 0 0]; value (0 9.81 0); Code:
RASModel laminar; turbulence on; printCoeffs on; Code:
thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; mixture air 1 28.9 1000 0 1.8e05 0.7; Code:
simulationType laminar; 0/FLUID_AMB/epsilon Code:
dimensions [0 2 3 0 0 0 0]; internalField uniform 0.001; boundaryField { FLUID_AMB_to_GAL { type compressible::epsilonWallFunction; value uniform 0.001; } FLUID_AMB_down { type compressible::epsilonWallFunction; value uniform 0.001; } FLUID_AMB_up { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } FLUID_AMB_left { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } FLUID_AMB_right { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } } Code:
dimensions [0 2 2 0 0 0 0]; internalField uniform 0.001; boundaryField { FLUID_AMB_to_GAL { type compressible::kqRWallFunction; value uniform 0.001; } FLUID_AMB_down { type compressible::kqRWallFunction; value uniform 0.001; } FLUID_AMB_up { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } FLUID_AMB_left { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } FLUID_AMB_right { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } } Code:
dimensions [1 1 2 0 0 0 0]; internalField uniform 1e5; boundaryField { FLUID_AMB_to_GAL { type calculated; value uniform 1e5; } FLUID_AMB_down { type calculated; value uniform 1e5; } FLUID_AMB_up { type calculated; value uniform 1e5; } FLUID_AMB_left { type calculated; value uniform 1e5; } FLUID_AMB_right { type calculated; value uniform 1e5; } } Code:
dimensions [1 1 2 0 0 0 0]; internalField uniform 1e5; boundaryField { FLUID_AMB_to_GAL { type buoyantPressure; value uniform 1e5; } FLUID_AMB_down { type buoyantPressure; value uniform 1e5; } FLUID_AMB_up { /* type outletInlet; outletValue 1e5; value 1e5; // would lead to adiabatic bounday? */ type waveTransmissive; psi psi; gamma 1; value uniform 1e5; /* type fixedValue; value uniform 100017.10; */ /* type totalPressure; p0 uniform 1e5; // Total pressure U U; // Name of the velocity field phi phi; // Name of the flux transporting the field rho rho; // Name of the density field used to normalise the mass flux if neccessary psi none; // Name of the compressibility field used to calculate the wave speed gamma 1; // Heat capacity ratio value uniform 0; */ } FLUID_AMB_left { type outletInlet; outletValue uniform 1e5; value uniform 1e5; /* type waveTransmissive; psi psi; gamma 1; value uniform 1e5; */ } FLUID_AMB_right { type outletInlet; outletValue uniform 1e5; value uniform 1e5; /* type waveTransmissive; psi psi; gamma 1; value uniform 1e5; */ } } Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { FLUID_AMB_to_GAL { // type compressible::turbulentTemperatureCoupledBaffle; type solidWallMixedTemperatureCoupled; neighbourFieldName T; K K; value uniform 300; } FLUID_AMB_down { type zeroGradient; value uniform 300; } FLUID_AMB_up { type inletOutlet; inletValue uniform 300; value uniform 300; } FLUID_AMB_left { type inletOutlet; inletValue uniform 300; value uniform 300; } FLUID_AMB_right { type inletOutlet; inletValue uniform 300; value uniform 300; } } Code:
dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0.01 0); boundaryField { FLUID_AMB_to_GAL { type rotatingWallVelocity; origin (0 0 0); axis (0 0 1); omega 41.887902053; } FLUID_AMB_down { type fixedValue; value uniform ( 0 0 0 ); } FLUID_AMB_up { type fluxCorrectedVelocity; value uniform ( 0 0 0 ); phi phi; rho rho; /* type pressureInletOutletVelocity; value uniform ( 0 0 0 ); */ } FLUID_AMB_left { type inletOutlet; inletValue uniform ( 0.05 0 0 ); value uniform ( 0.05 0 0 ); /* type pressureInletOutletVelocity; value uniform ( 0 0 0 ); */ } FLUID_AMB_right { type inletOutlet; inletValue uniform ( 0.05 0 0 ); value uniform ( 0.05 0 0 ); /* type pressureInletOutletVelocity; value uniform ( 0 0 0 ); */ } } 0/GAL/cp Code:
dimensions [0 2 2 1 0 0 0]; internalField uniform 450; boundaryField { ".*" { // type calculated; type zeroGradient; value uniform 450; } } Code:
dimensions [1 1 3 1 0 0 0]; internalField uniform 80; boundaryField { ".*" { // type calculated; type zeroGradient; value uniform 80; } } Code:
dimensions [1 3 0 0 0 0 0]; internalField uniform 8000; boundaryField { ".*" { type calculated; value uniform 8000; } } Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 473; boundaryField { GAL_to_FLUID_AMB { // type compressible::turbulentTemperatureCoupledBaffle; type solidWallMixedTemperatureCoupled; neighbourFieldName T; K K; value uniform 473; } GAL_inside { type fixedValue; value uniform 473; } } Well, as the upload file size is limited per file, I had to split the archive... You can easily unpack with this single command line: Code:
$ cat example.tar.gza*  tar zxvf  The case has a ./Allclean script that should clean up everything and a ./Allrun script to run the case. Note, that the log.blockMesh.* files should not be removed, as the correct settings in constant/*/polyMesh/boundary would have to be set manually afterwards! That's why I included those files (and logfiles) into the package...
__________________
CAELinux 2010  OpenFOAM 1.7 

April 11, 2011, 07:32 

#3 
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 
So far for now. For those who want to give it a test run, just try the above case files (BCs might slightly differ, as I tried many combinations).
What I tried so far, are different bc setups mostly for U and p_rgh of the fluid. What should be most appropriate for U at left, right and top boundary, is in my opinion pressureInletOutletVelocity although I'm not sure, whether this would "amplify" a given state of the system and by this lead to instability. The header file for this velocity boundary condition says: "Velocity inlet/outlet boundary condition patches for where the pressure is specified. Zerogradient is applied for outflow (as defined by the flux) and for inflow the velocity is obtained from the patchface normal component of the internalcell value." Sounds nice... but I didn't manage to set it up with a good BC for pressure by now. Thus I think I need to specify p and/or p_rgh. I found this posting on that subject: http://www.cfdonline.com/Forums/ope...tml#post262838 Now... leaving p all calculated and setting left, right and top BC fpr p_rgh to uniformDensityHydrostaticPressure doesn't work... I get very low temperatures and stuff. Maybe setting p to calculated is wrong with that boundary condition? In the above mentioned thread, there's the advice to set pd=0 (in OF 1.5). How to apply this in my case and with respect to OF 1.7? Cheers & Thanks for reading so far! Wolle P.S.: I hope it's not "too much", but posting less might have lead to further information requests.... so I simply decided to post it all together...
__________________
CAELinux 2010  OpenFOAM 1.7 Last edited by Wolle; April 13, 2011 at 07:27. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Impinging Jet Boundary Conditions  Anindya  Main CFD Forum  25  February 27, 2016 12:58 
open channel flow boundary conditions  yan  FLUENT  0  July 4, 2005 23:36 
New topic on same subject  Flow around race car  Tudor Miron  CFX  15  April 2, 2004 06:18 
Please help with flow around car modelling!  Tudor Miron  CFX  17  March 19, 2004 19:23 
Open boundary conditions forKiva  G.Thibaudeau  Main CFD Forum  0  March 17, 2000 07:06 