
[Sponsors] 
July 12, 2010, 13:31 

#21 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
This one should work and run.
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

July 12, 2010, 22:01 

#22  
Member
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 9 
This is the p_rgh file now I use
//================================================== ============== FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 0; boundaryField { bottomInlet { type zeroGradient; } topInlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } pipe { type zeroGradient; } defaultFaces { type empty; } } // ************************************************** *********************** // Take care of the object name is "p_rgh", not "p", and also the dimension is different to simpleFoam. Quote:


July 13, 2010, 10:33 
p_rgh

#23 
New Member
victor
Join Date: Jul 2010
Posts: 5
Rep Power: 8 
The last file itīs OK.
I' m actually using p_rgh for a wave tank in interFoam. I used your case to update the wave tank files where I found the p_rgh missing. Thanks for your help Victor 

August 2, 2010, 11:01 

#24 
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 8 
Hi, I'm also having the same problem trying to extract "twoStream.tar.gz". Would someone be willing to post a working version for v1.7 or as Victor requested provide some additional detail on how to fix the error "p_rgh at line 0"?
Thanks in advance! 

August 2, 2010, 11:06 

#25 
Member
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 9 
Try this
//================================================== ============== FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 0; boundaryField { bottomInlet { type zeroGradient; } topInlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } pipe { type zeroGradient; } defaultFaces { type empty; } } 

August 2, 2010, 20:53 

#26 
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 8 
Thanks Maolong LIU!
When I use the your suggestion I get the following ======================= DILUPBiCG: Solving for alpha1, Initial residual = 0.00755434, Final residual = 2.4898e08, No Iterations 2 Phase 1 volume fraction = 0.501191 Min(alpha1) = 0 Max(alpha1) = 1 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.74871e12, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 9.82467e12, No Iterations 3 > FOAM FATAL IO ERROR: keyword p_rgh is undefined in dictionary "/home/hunts/Desktop/twoStream/system/fvSolution::solvers" file: /home/hunts/Desktop/twoStream/system/fvSolution::solvers from line 22 to line 73. From function dictionary::subDict(const word& keyword) const in file db/dictionary/dictionary.C at line 456. FOAM exiting ======================= Any ideas? My apologies. I'm relatively new to OpenFOAM. Thanks 

August 2, 2010, 21:14 

#27  
Member
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 9 
In the fvSoluction file, and also fvSchems file, because now you solve p_rgh equation in stead of p equation, so you need change p to p_rgh.
So just change all the word "p" to "p_rgh" in both those files. Quote:


August 2, 2010, 21:20 

#28  
Member
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 9 
This is my fvSolution file
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 1.6   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p_rgh { solver PCG; preconditioner DIC; tolerance 1e8; relTol 0; } p_rghFinal { solver PCG; preconditioner DIC; tolerance 1e8; relTol 0; } alpha1 { solver PBiCG; preconditioner DILU; tolerance 1e06; relTol 0; } U { solver PBiCG; preconditioner DILU; tolerance 1e08; relTol 0; } UFinal { solver PBiCG; preconditioner DILU; tolerance 1e08; relTol 0; } } PIMPLE { nOuterCorrectors 2; nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } Quote:


August 3, 2010, 01:09 

#29 
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 8 
Thank you!


December 10, 2010, 12:51 

#30 
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 10 
what does alphatab stand for ?


January 10, 2011, 13:15 

#31 
New Member
mehdoo
Join Date: Dec 2010
Posts: 3
Rep Power: 8 

January 25, 2011, 07:46 

#33 
New Member
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 10 

January 25, 2011, 08:34 

#34 
Member
Maolong LIU
Join Date: Apr 2010
Location: USA
Posts: 31
Rep Power: 9 

January 25, 2011, 08:36 

#35 
New Member
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 10 

January 25, 2011, 10:57 

#36 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
FYI, it is written in the code (createFields.H)
Code:
// Read the reciprocal of the turbulent Schmidt number dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab"));
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

July 8, 2011, 04:49 

#37 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 8 
I'm trying to write a separate case for using twoLiquidMixingFoam in a customized form. First, I removed the variables 'p' and 'g' and 'gh' and instead operated everything in 'p_rgh'. Next, I removed 'alphatab' and now the diffusivity works solely on Dab.
In pEqn.H { volScalarField rAU = 1.0/UEqn.A(); surfaceScalarField rAUf = fvc::interpolate(rAU); U = rAU*UEqn.H(); surfaceScalarField phiU ( "phiU", (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, rho, U, phi) ); adjustPhi(phiU, U, p_rgh); phi = phiU ;// ghf*fvc::snGrad(rho)*rAUf*mesh.magSf() for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix p_rghEqn ( fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) ); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.solve ( mesh.solver ( p_rgh.select ( finalIter && corr == nCorr1 && nonOrth == nNonOrthCorr ) ) ); if (nonOrth == nNonOrthCorr) { phi = p_rghEqn.flux(); } } U += rAU*fvc::reconstruct((phi  phiU)/rAUf); U.correctBoundaryConditions(); #include "continuityErrs.H" The problem is in the line fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) And the output reads > FOAM FATAL IO ERROR: keyword laplacian(interpolate((1A(U))),p_rgh) is undefined in dictionary "/home/tanay/OpenFOAM/tanay1.7.1/run/roughMix/system/fvSchemes::laplacianSchemes" file: /home/tanay/OpenFOAM/tanay1.7.1/run/roughMix/system/fvSchemes::laplacianSchemes from line 54 to line 63. So, I tried adding this line to fvSchemes but it didn't work. Any suggestions on what's missing in fvSchemes? Here's the fvSchemes file if anyone wishes to view it ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(U) Gauss linear; grad(muEff) Gauss linear; grad(p_rgh) Gauss linear; } snGradSchemes { default corrected; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev(grad(U).T()))) Gauss linear; div(phi,alpha1) Gauss limitedLinear 1; div(phi) Gauss limitedLinear 1; div(rhoPhi,U) Gauss limitedLinear 1; div(rho*phi,U) Gauss limitedLinear 1; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),p_rgh) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; laplacian(Dab,alpha1) Gauss linear corrected; laplacian(rAUf,p_rgh) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } fluxRequired { default no; p_rgh ; alpha1 yes; } 

July 10, 2011, 12:03 

#38 
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 142
Rep Power: 10 
Hi Tanay,
I think that you can have a problem with an extra "bracket". An error says: laplacian(interpolate((1A(U))),p_rgh) so here u have : ...U)))  triple closing ) but in your laplacianSchemes you have : .... laplacian((1A(U)),p_rgh) Gauss linear corrected; .... and: A(U)) double closing ) so it seems that you have some typo in your code. Cheers ZMM 

July 11, 2011, 02:14 

#39 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 8 
Yeah, thanks. That was a simple typo. Now, I'm getting a Courant number blowup.
Courant Number mean: 21.0277 max: 258.938 deltaT = 3.37996e06 Time = 0.0145817 #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #4 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<d ouble>&, Foam::Field<double> const&) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #5 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #6 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam171/lib/linuxGccDPOpt/libfiniteVolume.so" #8 in "/home/tanay/OpenFOAM/tanay1.7.1/applications/bin/linuxGccDPOpt/customizedTwoLiquidMixingFoam" #9 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #10 in "/home/tanay/OpenFOAM/tanay1.7.1/applications/bin/linuxGccDPOpt/customizedTwoLiquidMixingFoam" Floating point exception Lowering the time step just prolongs the blowup. All the fvSchemes (printed above) I've used correspond to a pimpleFoam tutorial and so they can't be too problematic. Where may be the error? 

July 15, 2011, 02:01 

#40 
New Member
Tanay Deshpande
Join Date: Aug 2010
Posts: 20
Rep Power: 8 
Well, ziemowit, I've given up trying to make the blowing up case converge since I tried everything from reducing the time step to decreasing the velocity and increasing laminar viscosity etc. So, now I'm trying to build a new solver based on PIMPLE to simulate twoLiquidMixing. In this, I've included a file called customTwoLiquid.H for laminar mixing. It reads as
surfaceScalarField muEff ("muEff", (alpha1*mu1 + (scalar(1)alpha1)*mu2)); volScalarField rho ("rho", (alpha1*rho1 + (scalar(1)alpha1)*rho2)); surfaceScalarField rhoIntoPhi ("rhoIntoPhi", rho*phi); Now this produces a compilation error. Can you please tell me what's wrong? 

Thread Tools  
Display Modes  

