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

bubbleFoam problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 3, 2010, 12:15
Default bubbleFoam problem
  #1
New Member
 
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 6
Benjy is on a distinguished road
Hello,
I'm trying the bubbleColumn case of the OF tutorials (multiphase flow, bubbleFoam) with a different geometry created using Ansys ICEM, imported as fluent mesh using fluentMeshToFoam.

When i run the solver, i get this error msg.

Create time

Create mesh for time = 0


Reading g
Reading field alpha



--> FOAM FATAL IO ERROR:
size 1875 is not equal to the given value of 49020

file: /home/benjy/OpenFOAM/benjy-1.7.1/run/myBubbleColumn/0/alpha from line 17 to line 1922.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /opt/openfoam171/src/OpenFOAM/lnInclude/Field.C at line 236.

FOAM exiting

I gues the problem was on the number of the cells in the geometrical mesh.
Could someone please explain the difference between the 0 and 0.org files?
I realised that the 0.rg file contains the original boundry conditions while the 0 file contains some calculated values for alpha, Ua, Ub and P

Any help will be highly appreciated.

Benjy
Benjy is offline   Reply With Quote

Old   December 12, 2010, 02:44
Default
  #2
New Member
 
Mohammad
Join Date: Oct 2010
Posts: 4
Rep Power: 6
saadat66 is on a distinguished road
Hi Benjy.
when you import mesh from other meshing software in openfoam, you need to change time = 0 file same as your boundry file.
i hope this can help you even though you may solve this problem .
Best Regards.
mohammad.
saadat66 is offline   Reply With Quote

Old   December 12, 2010, 23:56
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Benjy View Post
--> FOAM FATAL IO ERROR:
size 1875 is not equal to the given value of 49020

file: /home/benjy/OpenFOAM/benjy-1.7.1/run/myBubbleColumn/0/alpha from line 17 to line 1922.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /opt/openfoam171/src/OpenFOAM/lnInclude/Field.C at line 236.
It is a problem in the initialized fields. The old mesh has a different number of points from the new one, so the non-uniform fields contain the old number of values.

Set them to uniform, and initialize again.

Quote:
I realised that the 0.rg file contains the original boundry conditions while the 0 file contains some calculated values for alpha, Ua, Ub and P
You do not need to have the .org directory. Just remove the 0 directory, and rename the 0.org to 0. Then initialize the simulation for your case using setFields.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   December 13, 2010, 14:18
Default
  #4
New Member
 
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 6
Benjy is on a distinguished road
Hi,
Thanks Alberto, your explanation is well clear. i tried it and it worked fine. But i have one more problem. Actuially, my task has to do with static mixing of non-Newtonian fluid and nanofluid. I am trying to use bubbleFoam but i'm having big problem in rewriting the bubbleFoam code files to take care of the power law for the non-Newtonian part.

I tried changing the vbiscosity of the base newtonian fluid but i keep on geting error.

Could you be of any help? it will be highly appreciated.

Benjamin
Benjy is offline   Reply With Quote

Old   December 13, 2010, 15:26
Default
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
How did you implement the power law? :-)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   December 14, 2010, 14:01
Default
  #6
New Member
 
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 6
Benjy is on a distinguished road
i have been trying to change the UEqns.H file.
for the calculation of Ub which is the base fluid i added the following:
# include "singlePhaseTransportModel.H";

#include "singlePhaseTransportModel.H"
volTensorField Rcb = -nuEffb*fvc::grad(Ub)().T();
Rcb = Rcb + (2.0/3.0)*I*k - (2.0/3.0)*I*tr(Rcb);
surfaceScalarField phiRb =
- fvc::interpolate(nuEffb)
*mesh.magSf()*fvc::snGrad(beta)/fvc::interpolate(beta + scalar(0.001));

fluid.correct();
UbEqn =
(
(scalar(1) + Cvm*rhob*alpha/rhob)*
(
fvm::ddt(Ub)
+ fvm::div(phib, Ub, "div(phib,Ub)")
- fvm::Sp(fvc::div(phib), Ub)
)
- fvm::laplacian(fluid.nuEffb(), Ub)
+ fvc::div(Rcb)
+ fvm::div(phiRb, Ub, "div(phib,Ub)")
- fvm::Sp(fvc::div(phiRb), Ub)
+ (fvc::grad(beta)/(fvc::average(beta) + scalar(0.001)) & Rcb)
==
// g // Buoyancy term transfered to p-equation
- fvm::Sp(alpha/rhob*dragCoef, Ub)
//+ alpha/rhob*dragCoef*Ua // Explicit drag transfered to p-equation
+ alpha/rhob*(liftCoeff + Cvm*rhob*DDtUa)
);
UbEqn.relax();
I did this taking concideration of the similarity between icoFoam and the nonNewtonianIcoFoam.

I also included in the crearFields.H file the following:
#include "createPhib.H"
singlePhaseTransportModel fluid(Ub, phib);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh
),
fvc::interpolate(alpha)*phia
+ fvc::interpolate(beta)*phib
);

When i run wmake, the following errors are what i get:
benjy@benjy-laptop:~/OpenFOAM/benjy-...my_bubbleFoam$ wmake
Making dependency list for source file my_bubbleFoam.C
could not open file singlePhaseTransportModel.H for source file my_bubbleFoam.C
SOURCE=my_bubbleFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/my_bubbleFoam.o
In file included from my_bubbleFoam.C:63:
UEqns.H:35:43: error: singlePhaseTransportModel.H: No such file or directory
In file included from my_bubbleFoam.C:47:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:147: error: ‘singlePhaseTransportModel’ was not declared in this scope
createFields.H:147: error: expected ‘;’ before ‘fluid’
In file included from my_bubbleFoam.C:63:
UEqns.H:44: error: ‘fluid’ was not declared in this scope
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable ‘momentumPredictor’
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
make: *** [Make/linuxGccDPOpt/my_bubbleFoam.o] Error 1

I have absolutely no any idea more and needs help of any.

thanks

Benjamin
Benjy is offline   Reply With Quote

Old   December 14, 2010, 15:13
Default
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Hint: do not proceed "by similarity", because it is a good way to have an inconsistent implementation.

Write down the equations and modify them as needed to include the new law for the viscosity. In other words, since the power law is simple, re-write it directly in bubbleFoam, without relying on the single-phase models, at least at this stage of the development.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   December 14, 2010, 15:58
Default
  #8
New Member
 
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 6
Benjy is on a distinguished road
Thanks for the hint Alberto, i thought as much but my biggest problem is that my programming ability is too shallow. I haven't succeded in writing an error-free program code since i started working with OF.

Could you send to me per E-mail an idear on how to inpliment the power-law direct in bubbleFoam or a link to any solver where the power law is inplimented?

my E-mail: nara_76@msn.com

best regards

Benjamin.
Benjy is offline   Reply With Quote

Old   December 14, 2010, 16:05
Default
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
No, sorry, I do not code for others in my spare time. Try, and keep asking questions, but it is your job, and I cannot do it for you.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto 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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Incoherent problem table in hollow-fiber spinning Gianni FLUENT 0 April 5, 2008 10:33
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 03:10.