bubbleFoam problem
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 |
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. |
Quote:
Set them to uniform, and initialize again. Quote:
Best, |
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 |
How did you implement the power law? :-)
|
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 |
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, |
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. |
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, |
All times are GMT -4. The time now is 05:24. |