|
[Sponsors] |
April 24, 2015, 05:09 |
|
#21 |
Senior Member
|
||
May 11, 2015, 02:18 |
|
#22 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
Thanks vigges, i am trying to make the solver work for this case file http://sourceforge.net/projects/viscoelasticof/
mr Favero (I think) and Jasak had a paper with this model. I'll keep you guys updated on results and what to do. Thanks adambarfi for the input, i had no idea what dimensions to use. Do you have any definition of the "parameters for solvent shear-thinning viscosity"? (mu0 muInf...) I am grinding literature about this now but it's rather hard to look for dimensions lile 'a' and 'b' Last edited by Supersale; May 11, 2015 at 05:24. |
|
May 11, 2015, 08:41 |
|
#23 |
New Member
heidi
Join Date: Mar 2015
Posts: 6
Rep Power: 11 |
hi SuperScale
can you share your files of system with me, for example , fvSchemes, fvSolution? |
|
May 11, 2015, 23:09 |
|
#24 | |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
Quote:
Anyway, here it is... fvSchemes: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(U) Gauss linear; //grad(gamma) Gauss linear; // - in the original. old naming for alpha grad(alpha) Gauss linear; } divSchemes { div(rho*phi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(phi,taufirst) Gauss upwind; div(phi,tau) Gauss upwind; div(tau) Gauss linear; } laplacianSchemes { default Gauss linear corrected; laplacian(etaPEff,U) Gauss linear corrected; laplacian(etaPEff+etaS,U) Gauss linear corrected; laplacian((1|A(U)),p) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; pcorr; alpha; } // ************************************************************************* // |
||
May 11, 2015, 23:13 |
|
#25 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
sorry, i'll post the rest later today...
|
|
May 12, 2015, 05:10 |
|
#26 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
adambarfi, may i ask you why you defined CrossPowerLaw and the BirdCarreau thing? i can't find it in the solver and it is not asked when i run the simulation without it
|
|
May 12, 2015, 12:51 |
|
#27 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
fvSolution:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { pcorr { solver PCG; preconditioner { preconditioner DIC; tolerance 1e-13; relTol 0; smoother DICGaussSeidel; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration false; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-10; relTol 0; maxIter 1000; } p_rgh { solver GAMG; tolerance 1e-13; relTol 0.01; smoother DIC; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } p_rghFinal { solver PCG; preconditioner { preconditioner DIC; tolerance 1e-13; relTol 0; nVcycles 2; smoother DICGaussSeidel; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-13; relTol 0; maxIter 20; } U PBiCG { preconditioner { type DILU; } minIter 0; maxIter 1000; tolerance 1e-08; relTol 0; }; taufirst PBiCG { preconditioner { type Cholesky; } minIter 0; maxIter 1000; tolerance 1e-8; relTol 0.0; }; tau PBiCG { solver PBiCG; preconditioner { preconditioner DILU; tolerance 1e-13; relTol 0; nVcycles 2; smoother DICGaussSeidel; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-13; relTol 0; maxIter 20; }; alphaphase1 { nAlphaCorr 1; nAlphaSubCycles 1; cAlpha 1; }; } PIMPLE { momentumPredictor no; nCorrectors 3; nNonOrthogonalCorrectors 1; nAlphaCorr 1; nAlphaSubCycles 4; cAlpha 2; pdRefCell 0; pdRefValue 0.0; } relaxationFactors { // p 0.97; // U 0.9; // taufirst 0.3; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class dictionary; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( // volScalarFieldValue gamma 0 volScalarFieldValue alpha.phase1 0 // volVectorFieldValue U (0 0 0) volSymmTensorFieldValue taufirst (0 0 0 0 0 0) ); regions ( boxToCell { box (-1 0.015 -1) (1 1 1); fieldValues ( // volScalarFieldValue gamma 1 volScalarFieldValue alpha.phase1 1 ); } ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.4 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application viscoelasticInterFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 10; deltaT 1e-8; writeControl adjustableRunTime; writeInterval 0.01; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 0.01; maxAlphaCo 0.2; maxDeltaT 0.01; // ************************************************************************* // |
|
May 14, 2015, 05:48 |
|
#28 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
OK i think i figured out what these parameters are (mu0, muInf...)
It's to model the shear-thinning behaviour, and the equation can be found in viscoelasticTwoPhaseMixture.C at the top. The equation is: Code:
if (viscosityType_ == "ShearThinning") { volScalarField shearRate_ = sqrt(2.0)*mag(symm(fvc::grad(U_))); volScalarField etaL_ = muInf_ + ( (mu0_ - muInf_) / pow((scalar(1) + pow((k_*shearRate_),b_)),a_) ); etaS_ = limitedAlpha1_*etaL_ + (scalar(1) - limitedAlpha1_)*etaS2_; } (eta - eta_inf) / (eta_0 - eta_inf) = 1 / (1 + (K * kappa) ^ m) while the Carreau model looks like: (eta - eta_inf) / (eta_0 - eta_inf) = 1 / (1 + (K * kappa) ^ 2) ^ m/2 now; etaL is eta mu0 is eta_0 [Pa.s] muInf is eta_inf [Pa.s] k is K (a constant with the dimensions of time) [s] kappa is the shear-rate m is a dimensionless constant Regarding 'a' and 'b', depending on the model used, 'a' is either m/2 or 1 and 'b' is either 2 or m. I also found some values for it. For polyarylamide: eta_0=1.82Pa.s, eta_inf=2.6mPa.s, K=1.5s and m=0.6. I copied the Giesekus model into viscoelasticTwoPhaseMixture.C from the extend version, recompiled it and running it now. if it works i'll upload the case file and solver. Anyone has more info about 'a' and 'b'? i kept the transport model 'Newtonian' |
|
May 17, 2015, 06:51 |
|
#29 |
New Member
arash
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
Does any one have a test case for this solver?
|
|
May 17, 2015, 10:20 |
|
#30 |
Senior Member
|
the case I ran it just one time is attached.
hope it helps you all viscoelastic FOAMers Regsrds, Mostafa |
|
May 18, 2015, 16:37 |
|
#31 |
New Member
arash
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
Reading g
Calculating field g.h time step continuity errors : sum local = 0, global = 0, cumulative = 0 DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0, global = 0, cumulative = 0 Courant Number mean: 0 max: 0 Starting time loop Courant Number mean: 0 max: 0 Interface Courant Number mean: 0 max: 0 deltaT = 1.19048e-05 Time = 1.19048e-05 MULES: Solving for alphawater Phase-1 volume fraction = 0.825498 Min(alpha1) = 0 Max(alpha1) = 1 MULES: Solving for alphawater Phase-1 volume fraction = 0.825498 Min(alpha1) = 0 Max(alpha1) = 1 --> FOAM FATAL ERROR: updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient. From function fixedFluxPressureFvPatchScalarField::updateCoeffs( ) in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 151. FOAM exiting I have this error when i run the solver can any one help? |
|
May 18, 2015, 16:41 |
|
#32 |
New Member
arash
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
||
May 18, 2015, 17:05 |
|
#33 |
Senior Member
|
Dear Arash,
Can you attach your solver, I think there're some problems with the solver. |
|
May 19, 2015, 07:24 |
|
#34 |
New Member
arash
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
sure...
my solver is the solver which have been posted in previous posts by Mr Bruno santos... sorry but I can't run your test case by this solver. Thank you very much for your reply. |
|
May 21, 2015, 22:12 |
|
#35 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
OK, what i noticed while running this solver is that when I make use of the viscoelastic parameters (rho, etaS, etaP, lambda and aplha) i.e. i assign them a value that is bigger than 0, i have huge pressure fluctuations in the results. for example, i set p_rgh to be 1e5, and it shouldn't change much from that value, but when i check the results, in some time-steps the pressure range goes from -3e7 to 1e6 then from 2.48e5 to -1.2e5 (the same spots in the previous timesteps now have a different sign/foretoken). it fluctuates heavily. did anyone experience this in OpenFOAM before? Any solution recommended?
|
|
May 28, 2015, 01:41 |
|
#36 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
adambarfi, the case file you uploaded is not correct. the boundary conditions in 0/ do not agree with the geometry and mesh (which is from the dam break case)
for example in U you have walls, axiss, tray, inlet, outlet and frontAndBackPlanes which you don't have in the boundary file. also, may i ask you which version of openfoam you are using? thanks |
|
May 28, 2015, 02:56 |
|
#37 | |
Senior Member
|
Quote:
The mesh was compiled before and the geometry is not as the same as the dam break case. you can run whatever geometry you want. just you need to change the boundary conditions. For example you can use the geometry and boundary conditions of dam break case. Regards, Mostafa |
||
May 31, 2015, 22:15 |
|
#38 |
New Member
Sasa Goran
Join Date: Feb 2015
Location: Japan
Posts: 23
Rep Power: 11 |
ok, i did set it up and run it. works. it's ridiculous how much faster your case works than mine (the setup of fvSolusions and fvSchemes was very different) just shows how much more i need to learn about the program. Anyway, thank you again. i'll continue to work on this
|
|
June 1, 2015, 01:47 |
|
#39 | |
Senior Member
|
Quote:
good luck, Mostafa |
||
June 1, 2015, 10:00 |
question
|
#40 |
New Member
arash
Join Date: Jan 2015
Posts: 14
Rep Power: 11 |
Hi Mr Mahmoudi
which version of openfoam you have used for this test case? and is your solver same as the solver which i have been attached in my last post? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free surface flow over a bump | qtian | OpenFOAM Running, Solving & CFD | 17 | August 10, 2010 11:15 |
Scaling up a wave energy converter - free surface flow | mark_l | CFX | 3 | February 17, 2010 17:57 |
free surface flow same as FSI??? | Ken | CFX | 1 | February 18, 2008 20:43 |
How to determine delta t for free surface flow | phsieh2005 | Main CFD Forum | 0 | September 14, 2005 12:52 |
incompressible free surface flow past cylinder | vineet | FLUENT | 2 | April 1, 2002 06:56 |