|
[Sponsors] |
December 3, 2010, 11:15 |
bubbleFoam problem
|
#1 |
New Member
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 15 |
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 |
|
December 12, 2010, 01:44 |
|
#2 |
New Member
Mohammad
Join Date: Oct 2010
Posts: 4
Rep Power: 0 |
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. |
|
December 12, 2010, 22:56 |
|
#3 | ||
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Quote:
Set them to uniform, and initialize again. Quote:
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|||
December 13, 2010, 13:18 |
|
#4 |
New Member
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 15 |
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 |
|
December 13, 2010, 14:26 |
|
#5 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
December 14, 2010, 13:01 |
|
#6 |
New Member
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 15 |
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 |
|
December 14, 2010, 14:13 |
|
#7 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
December 14, 2010, 14:58 |
|
#8 |
New Member
Benjamin Nwobodo
Join Date: Sep 2010
Posts: 11
Rep Power: 15 |
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. |
|
December 14, 2010, 15:05 |
|
#9 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
|
|
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 |