CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Need Help w. Darcy Boussinesq Equ.

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   October 12, 2011, 14:26
Default
  #21
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 245
Rep Power: 10
Cyp is on a distinguished road
Try to impose a delta P (fixedValue for inlet and fixedValue = 0 for outlet).

If you want a immobile system, I think a zeroGradient for inlet and fixedValue = 0 for outlet should work...

Note that since we solve only the pressure and the temperature in the solver, the boundary condition for the velocity field are not accounted for.
Cyp is offline   Reply With Quote

Old   October 12, 2011, 15:33
Default
  #22
New Member
 
Werner
Join Date: Dec 2009
Location: Austria
Posts: 13
Rep Power: 8
nep101 is on a distinguished road
The problem we try to solve is this onset of thermal convection in a porous cylinder with conducting wall. So there is no inlet or outlet.
I also thougt that there is maybe a problem with the boundaries. In most cases when i got a floiting point exception, it was a problem with the bopundaries.

But the mainproblem is (i think), that the pressureequation is not properly solved or coded.

Cheers
nep101 is offline   Reply With Quote

Old   October 12, 2011, 23:22
Default
  #23
New Member
 
Tom
Join Date: Sep 2011
Posts: 11
Rep Power: 7
TomB is on a distinguished road
Gday Cyp and Nep

Thanks so much for your input and collaboration, this has been a huge help to me.

I re-wrote my solver, based on the laplacianFoam. I wrote up some comments along the way.

I'd like to look into it to 'see' how pressure and velocity are linked. That is what I will do next, to make sure its working as expected at this stage.

I'm going to try to set up a pressure gradient with the boundary conditions as you two were discussing.

my method is
break the problem into a number of smaller steps on Cyps guidance
1. solve simple Darcy's Law, based on laplacianFoam (exclude the Temp term)
2. include a scalar transport equation
3. then look at adding temperature
4. then look at correcting T,U
5. add the (Ra*T*k) term to the U eqn
Cheers

Tom
Attached Files
File Type: c darcyLaplacianFoam.C (2.4 KB, 20 views)
File Type: txt README.txt (3.8 KB, 14 views)
TomB is offline   Reply With Quote

Old   October 13, 2011, 09:25
Default
  #24
New Member
 
Werner
Join Date: Dec 2009
Location: Austria
Posts: 13
Rep Power: 8
nep101 is on a distinguished road
Hi Tom,

wich equation you want to solve?
Is it necessary to handle the equations in a dimensionless form.
What i try to say is, that MAYBE (im no Pro in Openfoam) it is not so easy to handle nondimensionless equations in Openfoam.

Btw how is it going on??

Cheers
Werner
nep101 is offline   Reply With Quote

Old   October 13, 2011, 09:52
Default
  #25
New Member
 
Tom
Join Date: Sep 2011
Posts: 11
Rep Power: 7
TomB is on a distinguished road
Hi Werner

Im solving for convection in a box of porous media. Sounds very similar to your problem otherwise. I do want to do it in terms of the Rayleigh number and non-dimensional temperature.

I will fudge the units if i have to ! it seems to work ok with the dimensions switched off in the /opt location. I just dont like fiddling with those settings bcoz im an amatuer.

At the moment, i am trying to make the darcyLaplacian solver with some temperature terms added. I seem to be missing a curly bracket, but I'm not sure where.

Did you get a pressure gradient working?

Cheers

Tom
edit

I added my solver and the TEqn it needs. Im having issues now with boundaryConditions. It doesnt like taking the gradient of a calculated internalField.
Attached Files
File Type: c laplacianFoam.C (2.4 KB, 11 views)
File Type: h TEqn.H (181 Bytes, 11 views)

Last edited by TomB; October 13, 2011 at 10:29. Reason: added some files
TomB is offline   Reply With Quote

Old   October 13, 2011, 10:16
Default
  #26
New Member
 
Werner
Join Date: Dec 2009
Location: Austria
Posts: 13
Rep Power: 8
nep101 is on a distinguished road
HI Tom,

no i dont got my continuity equation working correctly.

Send me your solver, maybe i find your problem.

Cheers
Werner
nep101 is offline   Reply With Quote

Old   October 13, 2011, 10:40
Default
  #27
New Member
 
Tom
Join Date: Sep 2011
Posts: 11
Rep Power: 7
TomB is on a distinguished road
HI Werner

my solver is in the post above. I added another curly bracket and it works, but it doesnt make sense. i use bracket matching and indenting so i should be able to see where its missin..

I think my set up needs a setFields, so that the initial pressure is set before it starts to solve the fvm::laplacian(p)
TomB is offline   Reply With Quote

Old   October 13, 2011, 10:43
Default
  #28
New Member
 
Werner
Join Date: Dec 2009
Location: Austria
Posts: 13
Rep Power: 8
nep101 is on a distinguished road
Hi Tom,

which vers. of OF you use?
nep101 is offline   Reply With Quote

Old   October 13, 2011, 11:19
Default
  #29
New Member
 
Tom
Join Date: Sep 2011
Posts: 11
Rep Power: 7
TomB is on a distinguished road
Hi Nep

Im using OpenFoam 2.0.1

Im having an issue with the boundary. I get the error message,

gradientInternalCoeffs cannot be called for a calculatedFvPatchField.

it suggests I migh be using a default boundary condition. I copied the boundary conditions from buoyantBoussinesqSimpleFoam

I'll work on this some more tmw ( about 8 hours from now zzzzzzzzzzzzzzzz)
TomB is offline   Reply With Quote

Old   February 21, 2014, 13:11
Default
  #30
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Aurich
Posts: 35
Rep Power: 6
letzel is on a distinguished road
I am just wondering whether this old thread has ever been solved. I think my thread may need a similar solution.

Cheers,
Marcus
letzel is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boussinesq Assumption tstorm FLUENT 3 October 26, 2009 06:11
Boussinesq lucifer FLUENT 0 September 26, 2009 09:31
Outflow boundary condition for a boussinesq fluid lin OpenFOAM Running, Solving & CFD 19 July 31, 2009 08:50
Natural Convection in a storage tank - boussinesq? Jervds CFX 5 November 19, 2008 07:01
Darcy + multiphase? George Bergantz CD-adapco 1 March 14, 2002 06:07


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