CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Channel flow

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

Like Tree1Likes
  • 1 Post By Hrvoje Jasak (Hrvoje)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2002, 16:17
Default Hi, I want to run a channe
  #1
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Hi,

I want to run a channel which is very loong
and am only interested in the fully developed flow.

Is there an easy way to use a short channel instead where I map the outlet conditions to the inlet.

I don't have/know the pressure difference driving the
flow, only the inlet conditions.

Niklas
  Reply With Quote

Old   March 27, 2002, 17:45
Default Hi, Yes, we've got somethi
  #2
Hrvoje Jasak (Hrvoje)
Guest
 
Posts: n/a
Hi,

Yes, we've got something like that For starters, a fully developed channel is a 1-D problem, so you can actually save a lot with this.

The application you want is in the standard release and it's called boundaryFoam. Creata a 1-D mesh across the height of the channel and put a wall at the top and the bottm and a nothing all the way around. Then, you select your favourite turbulence model and into the transportPorperties dictionary add the Ubar entry to specify the average velocity. Run it for a bit and see what you get :-). You can then use our lovely mapping tools to transfer the solution where you need it (say a 3-D case).

Hrv

P.S. If you get stuck, shout and we'll provide and example. Also, there is quite a powerful lobby over here to get the FoamX setup for the code (hello, Chris!) :-)
sharonyue likes this.
  Reply With Quote

Old   March 28, 2002, 04:28
Default Thanks, Our problem is a b
  #3
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Thanks,

Our problem is a bit more complex though.

The setup is like is -
Horizontal channel with gravity and two phase flow.

And we want to have a dispersion model for the discrete phase so all the particles don't end
up on the floor.

Do you think boundaryFoam can be extended to handle this?
I hear a yes, but is it easy/straightforward?

N
  Reply With Quote

Old   March 28, 2002, 07:30
Default Hi, The idea is that in a
  #4
Hrvoje Jasak (Hrvoje)
Guest
 
Posts: n/a
Hi,

The idea is that in a fully developed channel flow you can formulate the problem in 1-D and get rid of the convection part. The flow is driven by a driving force, based on the averave velocity in the system - this is boundaryFoam.

If you have a fully developed system, you can play exactly the same trick, so gravity and two-phase flow (Eulerian) would be no problem. This leaves us with the problem of spray. The issue here is that the continuity normal to the wall is no longer simple, i.e. you now need the pressure eqaution and the boundaryFoam simplifications are no longer appropriate.

What you really want is to make a 1-D mesh as above, but slap the cyclic boundaries at the front and back in the direction of the flow. Then you take your standard code and add the driving force the way it has been done in boundaryFoam and run that on the case. Provided the spray modelling includes the treatment of cyclic boundaries (get uot on one end = get in at the other) all will be well.

Hrv
  Reply With Quote

Old   March 28, 2002, 07:45
Default Thanks, No spray in this c
  #5
Niklas Nordin (Niklas)
Guest
 
Posts: n/a
Thanks,

No spray in this case, just 'simple' eulerian stuff.

I'll shout when I run into trouble

N
  Reply With Quote

Old   April 2, 2002, 07:30
Default Hi, I have a primitive pla
  #6
Eugene de Villiers
Guest
 
Posts: n/a
Hi,

I have a primitive plane mapper, that will allow you to map any flow variable(s) from a specified plane onto the inlet (or some other boundary). If you run into trouble with the boundaryFoam approach, let me know and I'll send you a sample code and intructions.

Eugene
  Reply With Quote

Old   April 2, 2002, 16:00
Default Hi, Most of the code requi
  #7
Hrvoje Jasak (Hrvoje)
Guest
 
Posts: n/a
Hi,

Most of the code required for the primitive patch mapping has actually been included into the foam2.1 release in the sampling library (foam2.1/src/sampling) - thanks Eugene! If you are providing the example, I'd definitely be interested but please try and have a go at the foam2.1 release for it.

Hrv
  Reply With Quote

Old   May 28, 2006, 12:46
Default Dear all, I am trying to us
  #8
Senior Member
 
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17
panara is on a distinguished road
Dear all,

I am trying to use boundaryFoam but when I run the tutorial cases nothing happens.. the velocity profile remains always constant... I tryed also to change the starting values of k and epsilon but without any results...

what's the problem? anybody can help?

Daniele
panara is offline   Reply With Quote

Old   January 10, 2007, 18:42
Default Dear Eugene and all, Eugene
  #9
New Member
 
Ram Poudel
Join Date: Mar 2009
Location: Flagstaff, arizona, USA
Posts: 9
Rep Power: 17
rcpoudel is on a distinguished road
Dear Eugene and all,

Eugene: I want to map flow variable from a specified plane to the inlet or oulet. Can I see your plane-mapper?

Does OpenFoam 1.3 has any plane-mapper tool with it?

Regards,
Ram Poudel
rcpoudel is offline   Reply With Quote

Old   January 10, 2007, 19:49
Default Just use patctToPatch interpol
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,904
Rep Power: 33
hjasak will become famous soon enough
Just use patctToPatch interpolation.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 11, 2007, 00:31
Default Hrv, I execute simpleFoam s
  #11
New Member
 
Ram Poudel
Join Date: Mar 2009
Location: Flagstaff, arizona, USA
Posts: 9
Rep Power: 17
rcpoudel is on a distinguished road
Hrv,

I execute simpleFoam simulation for a 3D flat-plate. I want to extract velociy and other fields at a plane somewhere center of domain and use it as inlet condition for turbFoam on the same volume grid.

I check the code. However could not success on its implementation. Appreciate if you could give some detail hints/steps on how to use patchToPatchInterpolation for this case.

Thanks for you time.
Ram Poudel
rcpoudel is offline   Reply With Quote

Old   January 11, 2007, 09:50
Default Here comes: - First you cre
  #12
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,904
Rep Power: 33
hjasak will become famous soon enough
Here comes:

- First you create the face zone representing face you wish to sample. You can do this by writing a piece of top-level code or using a setSet utility. To create a face zone, you will select mesh faces and give them orientation (orientation is given with a flag saying if the face needs to be flipped or not to create an oriented surface).

- Second, you will choose the patch you wish to project on: that should be easy

- Third, you will create an object of type patchToPatch interpolation. As a "from patch" you will use the face zone and a "to patch" is the boundary. Thus

patchToPatchInterpolation pp
(
mesh.faceZones()[myZoneIndex](),
mesh.boundaryMesh()[myPatch]
);


- Fourth, you will choose the information you wish to interpolate. patchToPatchInterpolation will interpolate both point-based and face-based data. I suspect you will wish to use face data.

- Fifth, you will need to select what data to map. You can either choose the face data or the data in front or behind the face zone. You will get the addressing from the faceZone class, either masterCells(), slaveCells(), or the actual face labels you've used. You will pack this information in a field, e.g. vectorField of velocities you wish to interpolate.

- Finally, you will get the mapped information doing the following:

vectorField zoneVel(...);

// fill zoneVel here, to match the faceZone)

vectorField mappedVel = pp.faceInterpolate(zoneVel);


Hope this is clear,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 19, 2008, 21:22
Default I tried to follow these steps,
  #13
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
I tried to follow these steps, but I need just a little bit more help on the above method by Jasak. I want to map the outlet boundary values to the inlet. Where do I implement steps 3-6 ? Is there an example of this somewhere?

Dan
chegdan is offline   Reply With Quote

Old   April 2, 2010, 07:06
Default
  #14
Member
 
Jinbiao Xiong
Join Date: Oct 2009
Location: China/Japan
Posts: 50
Rep Power: 16
JinBiao is on a distinguished road
Send a message via MSN to JinBiao
I am a beginner. I have a question why do we have to use boundaryFoam. Can we just compute, for example, for the flow in a long channel if we want a fully developed channel flow? It is just the time which make us prefer to choose boundaryFoam.

At the beginning I have no idea that we have something like boundaryFoam. So I computed the flow in a long channel and mapped the field to the geometry I want to calculate. The mapped part includes the inlet. I set the inlet boundary as fixedValue for U, k and epsilon. After mapping the field, I got nonuniform fixValue boundary at the inlet for these variables.

The problem is that I got an error as follow

Code:
Create time

Create mesh for time = 2

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model LaunderSharmaKE
#0  Foam::error::printStack(Foam::Ostream&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  ?? in "/lib/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6  Foam::incompressible::RASModels::LaunderSharmaKE::fMu() const in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7  Foam::incompressible::RASModels::LaunderSharmaKE::LaunderSharmaKE(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#8  Foam::incompressible::RASModel::adddictionaryConstructorToTable<Foam::incompressible::RASModels::LaunderSharmaKE>::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#9  Foam::incompressible::RASModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#10  Foam::incompressible::turbulenceModel::addturbulenceModelConstructorToTable<Foam::incompressible::RASModel>::NewturbulenceModel(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#11  Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&) in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libincompressibleTurbulenceModel.so"
#12  main in "/home/openfoam/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/pisoFoam"
#13  __libc_start_main in "/lib/libc.so.6"
#14  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception
I donot know what is the difference between patchToPatch and mapFields. Is this problem caused by a wrong mapping?

Thanks in advance for any suggestion.

Jinbiao
JinBiao is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Channel flow DNS Abhinav Main CFD Forum 1 April 11, 2013 07:37
maintain a constant flow rate in channel flow ? Lewis Main CFD Forum 2 September 28, 2010 12:35
Channel flow set up Jung Main CFD Forum 2 November 21, 2007 07:51
channel flow Khan Main CFD Forum 0 February 3, 2007 11:39
channel flow help Tajul FLUENT 4 February 22, 2006 21:23


All times are GMT -4. The time now is 12:07.