|
[Sponsors] |
[QUESTION: Fully Developed Rectangle Channel Simulation] |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 24, 2020, 09:46 |
[QUESTION: Fully Developed Rectangle Channel Simulation]
|
#1 |
New Member
Anthony
Join Date: Nov 2020
Posts: 3
Rep Power: 6 |
Dear all:
Thanks for click this post. Recently I had some trouble with the simulation of fully-develped rectangle channel. The goal is to show the maximum velocity appears under the surface due to the effects of secondary flow. The surface velocity as init condition is distributed in a parabolic way as in fig [surfaceVelocityDistribution.jpg]. I try to solve this problem with simpleFoam but got something strange. The velocity profile vanish quickly in the first 0.2 m depth, as in fig [profile.jpg] -------------------------------------------------------------------------- Here is my U file, the rest of my code could be check in [rectangleSimulation.zip] Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { //type fixedValue; //value uniform (0 10 0); type cyclic; } outlet { //neighbourPatch outlet; //type zeroGradient; type cyclic; } upperWall { type fixedValue; value #codeStream { codeInclude #{ #include "fvCFD.H"; #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; //libs needed to visualize BC in paraview codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&> ( dict.parent().parent() ); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const label id = mesh.boundary().findPatchID("upperWall"); const fvPatch& patch = mesh.boundary()[id]; vectorField U(patch.size(), vector(0, 0, 0)); forAll(U, i) { const scalar x = patch.Cf()[i][0]; U[i] = vector(0., -1*2*x*(x-4)-0.057, 0.); } U.writeEntry("", os); #}; }; } lowerWall { //type noSlip; type fixedValue; value uniform (0 0 0); } frontAndBack { // type noSlip; type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // I would appreciate it if someone can help me with this problem. REFERENCE [1]Shi, J., T. G. Thomas, and J. J. R. Williams. "Large-eddy simulation of flow in a rectangular open channel." Journal of Hydraulic Research 37, no. 3 (1999): 345-361. [2]Kang, Hyeongsik, and Sung‐Uk Choi. "Reynolds stress modelling of rectangular open‐channel flow." International journal for numerical methods in fluids 51, no. 11 (2006): 1319-1334. |
|
December 25, 2020, 10:27 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
did you try the apply cyclic boundary condition together with meanVelocityForce fvOption?
This gives you a volumetric source term to obtain a specified mean velocity. In this way you can fix the Reynoldsnumber based on the bulk velocity. A tutorial can be found in incompressible/pimpleFoam/LES/channel395 What's the purpose to apply a parabolic profile at the top surface? The velocity at the upper wall should result from the solution Best Michael |
|
December 25, 2020, 10:50 |
|
#3 | |
New Member
Anthony
Join Date: Nov 2020
Posts: 3
Rep Power: 6 |
Quote:
Thanks for your kindly reply. It is precisely where the problem happens. I had found some threads similar to your answer. I did not set the bulk velocity in the fvOption file. The reason for setting the parabolic profile at the top surface is that I want to figure out what the velocity profile will be under the given surface velocity distribution(obtained by PIV, in the ideal case, it's parabolic), so I fix the upper boundary condition and run the k-omega model. Best regards, Anthony Reference Threads: - Periodic Boundary Condition - Inlet conditions for cyclic problem |
||
Tags |
boundaryconditions, channel, cyclic, openfoam, simplefoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Field function - Fully developed flow profile for a square micro channel | smorls | Main CFD Forum | 5 | April 9, 2015 12:01 |
UDF for 3D turbulent fully developed flow | howhs | Fluent UDF and Scheme Programming | 0 | August 1, 2013 12:47 |
How to introduce my desired fully developed Boundary Condition? | Milad06 | OpenFOAM Running, Solving & CFD | 0 | July 8, 2013 05:54 |
Fully developed flow ,CEL expression | kmgraju | CFX | 0 | August 6, 2010 05:15 |
Fully Developed Flow | kpsudhakar | CFX | 4 | June 7, 2010 07:03 |