# Boundary conditions: inlet and outlet

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 25, 2010, 09:19 Boundary conditions: inlet and outlet #1 New Member   Join Date: May 2010 Posts: 1 Rep Power: 0 Sponsored Links Hello, Does anyone know where I can find how to use the boundary conditions? I've looked at the user guide which tells me that a range of BCs are available at src/finiteVolume/fields/fvPatchFields/derived. But I don't know how to use them. I don't understand what goes with what (for example, a specific BC goes with mixed or calculated?). I'm studying a flow with an inlet (with a definite velocity) and an outlet. I don't know which BC I have to put for these 2 surfaces (inlet and outlet). As there is no gravity in my problem, I guess I should take a BC which fixes the pressure to zero for the outlet, but I don't know which one. Could anyone help me? thanks a lot in advance.

 May 26, 2010, 06:06 #2 Member   David Join Date: Dec 2009 Location: Spain Posts: 61 Rep Power: 9 For the velocity, you can put: Code: ```inlet { type fixedValue; value uniform (your inlet value, vector); } outlet { type zeroGradient; }``` and for the pressure: Code: ```inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; }``` These conditions works with laminar regime. Regards David

 May 26, 2010, 06:07 #3 Member   David Join Date: Dec 2009 Location: Spain Posts: 61 Rep Power: 9 Repeated post Last edited by David_010; May 26, 2010 at 06:08. Reason: Repeated post

 June 25, 2010, 01:56 #4 Member   Join Date: Jun 2010 Posts: 33 Rep Power: 9 Hey David, So what happens when you switch to turbulent? Can you keep the same boundary fields?? T

 June 28, 2010, 05:56 #5 New Member   Join Date: Jun 2010 Posts: 23 Rep Power: 9 Hi Foamers, I have the same question : are you sure it works only in a laminar case, one told me to use such conditions in my turbulent case. If it does not work in a turbulent case, do you know what kind of boudnary conditions would work so ? Cheers PS : Finally those conditions did not work in my DNS case, it gives me a field without any variation ... Help ^^ Last edited by NorbertB; June 28, 2010 at 07:01.

 June 28, 2010, 18:00 using outlet velocity profile as inlet #6 New Member   Tony Join Date: Jun 2010 Posts: 2 Rep Power: 0 Hi All, Does anyone know how to specify (in COMSOL) an inlet velocity profile from a previously solved model's outlet velocity profile? I've been trying to create a Fourier Series representation of the profile over time, but I am having trouble doing this with a space and time dimension together. Any help greatly appreciated. Thank you!

June 29, 2010, 03:22
To “using outlet velocity profile as inlet”
#7
New Member

beauty
Join Date: Feb 2010
Posts: 27
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by labarc35 Hi All, Does anyone know how to specify (in COMSOL) an inlet velocity profile from a previously solved model's outlet velocity profile? I've been trying to create a Fourier Series representation of the profile over time, but I am having trouble doing this with a space and time dimension together. Any help greatly appreciated. Thank you!
For this, the form provides two ways, one is mapFields, and the other is directMappedPatch. With the former, I mapped the whole field, but not outlet to inlet. Maybe I take a wrong understanding, you can have a try. I mapped the outlet velocity to the inlet using the directMappedPatch boundary. You should change two files:
1. in constant/polyMesh/boundary
inlet
{
type directMappedPatch;
nFaces #;
startFace #;
offset (0 0 1); // offset (0 0 1) is the distance between the inlet and the outlet

sampleMode nearestPatchFace;
samplePatch outlet;
}

2. in 0/U
inlet
{
type directMappedFixedValue;
value (0 0 0);
setAverage true;

average (0 0 2);
}

Then you can check whether you want results.

 June 29, 2010, 03:45 problem with boundary #8 New Member   beauty Join Date: Feb 2010 Posts: 27 Blog Entries: 1 Rep Power: 9 I also have problems on defining the bounary. For pressure, when using zeroGradient for inlet, everything goes well. After changing zeroGradient to calculated, I get this message: valueInternalCoeffs cannot be called for a calculatedFvPatchField on patch inlet of field p in file "/home/flow/OpenFOAM/flow-1.6/run/pipe/tphase/ke/0/p" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField::valueInternalCoeffs( const tmp&) const in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 145. can anyone tell us how to use the boundary conditions? Thanks beauty

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Saturn CFX 45 February 8, 2016 05:42 Joseph CFX 14 April 20, 2010 15:45 Pankaj CFX 9 November 23, 2009 05:05 Mark CFX 6 November 15, 2004 16:55 Tudor Miron CFX 15 April 2, 2004 06:18