|
[Sponsors] |
Wrong BC for VOF simulation using interFoam for flow past plate with k-omega-sst |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 19, 2017, 11:57 |
Wrong BC for VOF simulation using interFoam for flow past plate with k-omega-sst
|
#1 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Hi,
I was trying for several days to set up the correct BC for my case. I am simulating flow past plate with Re=50000. I am using interFoam to see the effect of free surface on this case. The water level is few centimeters above the pate. Its a 2D simulation with turbulent model using RAS. I tried several BC based on the tutorial and some suggestion in the forum. Unfortunately, I am doing something wrong, I cant keep the water level at a constant level. After a while all the water will be washed out of the domain. I know it for sure that I made a stupid mistake in the setting but I cant see it. Attached is my case, if someone have any idea , please let me know. |
|
February 23, 2017, 12:50 |
|
#2 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Hi,
I managed to get the water level to say at a constant level at the inlet and outlet. Unfortunately, the flow filed is wrong as you can see in the attached figures for the water fraction. Any input will be really appreciated! Bashar |
|
February 23, 2017, 12:51 |
|
#3 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
and this is the case file
|
|
February 27, 2017, 22:28 |
|
#4 |
Senior Member
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 13 |
On the top boundary you can try total pressure equal to zero for atmosphere instead of symmetry.
|
|
February 28, 2017, 06:32 |
|
#5 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
Do you mean to change the patch type? I am doing the meshing in Fluent , so what should be the type of the patch in Fluent for the upper surface? Can I make it output? Sent from my iPhone using CFD Online Forum mobile app |
||
February 28, 2017, 07:52 |
|
#6 |
New Member
Join Date: Mar 2015
Posts: 16
Rep Power: 11 |
Hi,
You don't need to change the mesh in Fluent. You can do it with the changeDictionary function. In your changeDictionaryDict file use something like : Code:
dictionaryReplacement { boundary { yourPatchName { type patch; } } } |
|
February 28, 2017, 08:00 |
|
#7 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
Thanks a lot , I never used or heard about this before ! Sorry still learning , I will read about this. Sent from my iPhone using CFD Online Forum mobile app |
||
March 17, 2017, 13:04 |
|
#8 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Hi,
I run the case at my spare time with different BC combination using the help of others user and the several suggestions on this website. I still didn't get a correct physical results. The behavior at this moment is much better from the starting point, however this time the water level don't stay constant. Its increasing with time. Below the BC I used. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type groovyBC; variables "yp=pos().y;"; valueExpression "(yp>0.11) ? 1 : 0"; value uniform 1; } outlet { type zeroGradient; /* type variableHeightFlowRate; lowerBound 0; upperBound 1; value $internalField; */ } plate { type zeroGradient; } top { type slip; } bottom { type slip; } frontAndBackPlanes { type empty; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type groovyBC; variables "yp=pos().y;Ux=((yp>0.11) ? 0.01 : 0.5);"; valueExpression "vector(Ux,0,0)"; value uniform (0 0 0); } outlet { type zeroGradient; } plate { type fixedValue; value uniform (0 0 0); } top { type slip; } bottom { type slip; } frontAndBackPlanes { type empty; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedFluxPressure; value uniform 0; } outlet { type zeroGradient; } plate { type fixedFluxPressure; value uniform 0;//$internalField; } top { type slip; } bottom { type slip; } frontAndBackPlanes { type empty; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 0.25; boundaryField { inlet { type fixedValue; value uniform 0.25; } outlet { type zeroGradient; } plate { type omegaWallFunction; value uniform 0.25; } top { type slip; } bottom { type slip; } frontAndBackPlanes { type empty; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 6e-4; //Estimated for T.I. = 4% boundaryField { inlet { type fixedValue; value uniform 0.0006; } outlet { type zeroGradient; } plate { type kqRWallFunction; value uniform 0.0006; } top { type slip; } bottom { type slip; } frontAndBackPlanes { type empty; } } // ************************************************************************* // |
|
March 27, 2017, 03:34 |
|
#9 |
New Member
Meher
Join Date: Jan 2014
Posts: 13
Rep Power: 12 |
Bashar,
Your top boundary cannot be slip. It should reflect atmospheric boundary conditions which was already suggested by others. You can refer to boundary conditions of ATMOSPHERE boundary in the below thread if you find any difficulty: Free surface flow in a channel: how to maintain water level Also, please correct the direction of gravity in g file. Meher. |
|
March 27, 2017, 08:38 |
Wrong BC for VOF simulation using interFoam for flow past plate with k-omega-sst
|
#10 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
Thanks again Meher, Unfortunately, I did this but with no luck! The behavior is not like the first pictures, but the water is going below the plate , and the surface is very disturbed. So, in short changing the top BC from wall to atmosphere didn't work. Sent from my iPhone using CFD Online Forum mobile app |
||
March 27, 2017, 08:42 |
|
#11 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Also Meher , what about the g? I am using it to be in the negative y direction , since my 2D plane is xy. Is this wrong?
Thank you Bashar Sent from my iPhone using CFD Online Forum mobile app Last edited by Bashar; March 27, 2017 at 15:12. |
|
March 28, 2017, 01:05 |
|
#12 |
New Member
Meher
Join Date: Jan 2014
Posts: 13
Rep Power: 12 |
Bashar,
My comments are based on what you have posted so far. My understanding of a free surface flow problem says that a top boundary should be reflecting atmospheric conditions which I cannot see in any of your previous posts. Same is the case with g. Both the case files you shared indicate negative z direction but not negative y. It's good that you already tried these changes. But it would be better if you post the exact case file along with mesh to rightly understand and help you out. Thank you Meher |
|
March 29, 2017, 15:09 |
|
#13 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
Thanks a lot Meher for your answer . I am sorry I didn't put the updated case files , I only put the the codes for the BC in the previous post #8 . Attached is the result of the checkMesh: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 3.0.1-119cac7e8750 Exec : checkMesh Date : Mar 29 2017 Time : 15:06:03 Host : "basharhpc" PID : 21894 Case : /home/bashar/OpenFOAM/bashar-3.0.1/run/1_Corrected nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 342640 internal points: 0 faces: 682820 internal faces: 340180 cells: 170500 faces per cell: 6 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 170500 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology bottom 410 822 ok (non-closed singly connected) plate 480 960 ok (non-closed singly connected) outlet 170 342 ok (non-closed singly connected) top 410 822 ok (non-closed singly connected) inlet 170 342 ok (non-closed singly connected) frontAndBackPlanes 341000 342640 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-2 -0.8 -0.05) (2.5 1.3 0.05) Mesh has 2 geometric (non-empty/wedge) directions (1 1 0) Mesh has 2 solution (non-empty) directions (1 1 0) All edges aligned with or perpendicular to non-empty directions. Boundary openness (1.47846e-18 3.52794e-17 -5.32995e-19) OK. Max cell openness = 3.04874e-16 OK. Max aspect ratio = 4.30387 OK. Minimum face area = 1.52097e-08. Maximum face area = 0.00133333. Face area magnitudes OK. Min volume = 1.52097e-09. Max volume = 1.33333e-05. Total volume = 0.944901. Cell volumes OK. Mesh non-orthogonality Max: 46.429 average: 23.0163 Non-orthogonality check OK. Face pyramids OK. Max skewness = 2.62783 OK. Coupled point location match (average 0) OK. Mesh OK. Sorry again for the confusion, and for not providing good descriptions . Bashar Last edited by Bashar; March 29, 2017 at 22:56. |
||
March 29, 2017, 23:16 |
|
#14 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
This is also the updated case. I am currently running this case, I am trying different combination of BC to see the effect. Please if you can give me your opinion regarding the setting. Many thanks.
Bashar |
|
March 30, 2017, 00:04 |
|
#15 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Bashar,
you can try with olaFoam ( https://github.com/phicau/OLAFOAM ), there is a tutorial named currentWaveFlume that is very close to what you want. It should be very easy for you to modify it to include the airfoil. Best, Pablo |
|
March 30, 2017, 00:26 |
|
#16 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
So , will this work under openFoam? or do I need to work in different software? Regards, Bashar |
||
March 30, 2017, 00:34 |
|
#17 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Yes, you need OpenFOAM to run olaFoam, because the wave/current generation modules are an extension of OpenFOAM.
Best, Pablo |
|
March 30, 2017, 00:53 |
|
#18 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
Best wishes , Bashar |
||
March 30, 2017, 08:51 |
|
#19 |
New Member
Meher
Join Date: Jan 2014
Posts: 13
Rep Power: 12 |
Bashar,
Any particular reason for configuring your case setup w.r.t alpha.air rather than using alpha.water ? Most of the interFoam tutorials use alpha.water. You may be right (I did not check thoroughly) but I prefer the conventional way as per tutorials. In setFieldsDict file, please check the dimensions once again. There is a mismatch with your bounding box dimensions (especially z dimensions) from checkMesh. Also, is it really necessary to explicitly specify volume fractions at inlet boundary in alpha.air file using groovy boundary condition ? Since you are already configuring the case with setFieldsDict, a zeroGradient boundary condition should suffice. Meher. |
|
March 30, 2017, 13:41 |
|
#20 | |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Quote:
http://www.sciencedirect.com/science...29801815006228 Also, regarding the mismatch in the mesh, I am fixing this using makeMesh to make to z direction 0.1 but I think I made a mistake, so I will correct this and run it again. When it comes to groovey BC , in the previous paper that I mentioned they have two different speed of air and water. For air they have 0.01 and for water 0.5 m/sec, thats why the use of groovey BC, other wise I think I need to do a new mesh with different inlet patch one for air and the other for water. I will test your suggestion to use zerogradient at the inlet but what should I use for the outlet? I mentioned early #14 that I run the case again with the attached BC in the previous zip file. Unfortunately, it runs only one second after that I have this message , with floating point: Code:
PIMPLE: iteration 1 smoothSolver: Solving for alpha.air, Initial residual = 0.00021203, Final residual = 5.58644e-07, No Iterations 1 Phase-1 volume fraction = 0.498669 Min(alpha.air) = 0 Max(alpha.air) = 1.00001 MULES: Correcting alpha.air MULES: Correcting alpha.air Phase-1 volume fraction = 0.498669 Min(alpha.air) = 0 Max(alpha.air) = 1.00065 [2] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [2] #1 Foam::sigFpe::sigHandler(int) at ??:? [2] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" [2] #3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? [2] #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? [2] #5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? [2] #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? [2] #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? [2] #8 ? at ??:? [2] #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" [2] #10 ? at ??:? [basharhpc:30594] *** Process received signal *** [basharhpc:30594] Signal: Floating point exception (8) [basharhpc:30594] Signal code: (-6) [basharhpc:30594] Failing at address: 0x3e800007782 [basharhpc:30594] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x35250) [0x7f55331fc250] [basharhpc:30594] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f55331fc1c7] [basharhpc:30594] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x35250) [0x7f55331fc250] [basharhpc:30594] [ 3] /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5scaleERNS_5FieldIdEES3_RKNS_9lduMatrixERKNS_10FieldFieldIS1_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEERKS2_h+0xb1) [0x7f55344541c1] [basharhpc:30594] [ 4] /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h+0x783) [0x7f5534457073] [basharhpc:30594] [ 5] /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x671) [0x7f5534459d21] [basharhpc:30594] [ 6] /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x16c) [0x7f553631f1ec] [basharhpc:30594] [ 7] interFoam(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x199) [0x487479] [basharhpc:30594] [ 8] interFoam() [0x43208a] [basharhpc:30594] [ 9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f55331e7ac0] [basharhpc:30594] [10] interFoam() [0x4390b9] [basharhpc:30594] *** End of error message *** -------------------------------------------------------------------------- mpirun noticed that process rank 2 with PID 30594 on node basharhpc exited on signal 8 (Floating point exception). -------------------------------------------------------------------------- Running reconstructPar on /home/bashar/OpenFOAM/bashar-3.0.1/run/2d_vof Bashar Last edited by Bashar; March 30, 2017 at 18:34. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Coherent structure for LES simulation of flow past plate with Re=50000 | Bashar | OpenFOAM | 1 | December 22, 2016 07:50 |
udf error | srihari | FLUENT | 1 | October 31, 2016 14:18 |