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

Boundary Conditions & Vector PDE solving

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2011, 00:03
Default Boundary Conditions & Vector PDE solving
  #1
New Member
 
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 15
Tanay is on a distinguished road
Hello Foamers,
After learning the basics of OpenFOAM and its programming, I have two questions-
1. We need to specify the boundary condition of every defined field variable (p, U, temp, conc) at every patch in the 0/ directory. What happens if we do not know the BC beforehand?
For example, if I'm writing a solver for laminar mixing of two species, one with conc=0 and the other with conc=1mol/m3 (at their respective inlets), what boundary conditions should I give for concentration at the walls and the outlet? zeroGradient doesn't help and fixedValue isn't possible.

2. For basic solvers (like laplacian, potential and scalarTransport PDEs), I've observed that the code is simply the euqtion statement solve(...==...); iterated a number of times with the controls being set by SIMPLE. But of course, for a vector equation like Navier-Stokes, the method is longer (predictor PEqn some n times- then corrector). So, if we have to code a scalar equation coupled to a vector
e.g.- ddt(C) == laplacian(diff,C) - div(C,U) where U is the velocity vector
will writing this equation statement in the outer loop of corr suffice to solve it?
What if we wish to write another vector equation?
Tanay is offline   Reply With Quote

Old   June 22, 2011, 00:31
Default
  #2
New Member
 
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 15
Tanay is on a distinguished road
Ok, I guess it'll help if I write down my specific problem.
I'm solving a pipeflow with two inlets, flowInlet has water coming in, minorInlet has ethanol (or any other miscible liquid) coming in at a right angle downwards. flowOutlet is the exit for the mixed flow. I'm trying to model this using a 'tampered' version of icoFoam.

So, here are the boundary conditions-
0/conc-
boundaryField
{
flowOutlet
{
type zeroGradient;
}
flowInlet
{
type fixedValue;
value uniform 0;
}
minorInlet
{
type fixedValue;
value uniform 10;
}
walls
{ type zeroGradient;}
}

0/p-
boundaryField
{
flowOutlet
{
type fixedValue;
value uniform 1e+05;
}
flowInlet
{
type zeroGradient;
}
minorInlet
{
type zeroGradient;
}
walls
{ type zeroGradient;}
}

0/U-
boundaryField
{
flowInlet
{
type fixedValue;
value uniform (5 0 0);
}
flowOutlet
{
type zeroGradient;
}
minorInlet
{
type fixedValue;
value uniform (0 -1 0);
}
walls
{ type fixedValue;
value uniform (0 0 0);
}
}

To icoFoam, I've added this equation in the main PISO loop-
solve
(fvm::ddt(conc) == fvm::laplacian(diff,conc) - (U & fvc::grad(conc)));
and set the variable conc and constant diff without any wmake compilation errors.
So, the mistake lies primarily in the boundary conditions I've set.
Are these boundary conditions correct?
On running the case I get the output that U is 0 for the outlet, p is constant everywhere and conc is 0 everywhere.
Please help with any suggestions. :-)
Also, does anyone have a simple pipeflow case with the correct boundary conditions for me to read and understand?
Tanay is offline   Reply With Quote

Old   June 22, 2011, 11:22
Default
  #3
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Tanay, I've attached a coupled solver for p-U-T, which was programmed following a tutorial (I think it is this one: http://www.tfd.chalmers.se/~hani/kur...ngTutorial.pdf). Excuse me for the Spanish comments, nevertheless you will be able to understand anyway. BC's you've posted are correct. So try and tells us how things have gone.

Regards.
Attached Files
File Type: gz icoScalarTransportFoam.tar.gz (5.1 KB, 14 views)
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   June 23, 2011, 02:10
Default
  #4
New Member
 
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 15
Tanay is on a distinguished road
Santiago,
He programado icoScalarTransport ya. Pero gracias por la ayuda. Yo no estaba funcionando correctamente Paraview en el caso de la concentración. Que acaba de añadir la ecuación de la temperatura para el circuito PISO exterior. Me pregunto si esto funciona incluso si queremos resolver algunos otros PDE con un volVectorField. Estoy trabajando en que en la actualidad.
Tanay is offline   Reply With Quote

Old   June 23, 2011, 08:16
Default
  #5
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Tanay, I can't understand at all what are you referring to with coupling a volVectorField. Solving ddt(C) == laplacian(diff,C) - div(C,U) and U at the same time is exactly what icoScalarTransportFoam does.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd 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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 22:51
Velocity blows up suddenly after 30,000+ iterations lordvon OpenFOAM Running, Solving & CFD 15 October 19, 2015 14:52
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 13:30
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32


All times are GMT -4. The time now is 08:33.