
[Sponsors] 
Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam 

LinkBack  Thread Tools  Display Modes 
August 22, 2011, 11:45 

#161 
New Member
mmam
Join Date: Aug 2011
Location: Porto
Posts: 3
Rep Power: 7 
Dear ata
I appreciate your quick answer I compiled everything and I changed fvSolutions as you mentioned in forum but when I want to run a case (FENEP): the error is: mam@ubuntu:~/OpenFOAM/mam2.0.0/RUN/tutorials/incompressible/viscoelasticFluidFoam/FENEP$ viscoelasticFluidFoam /**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.0.0   \\ / A nd  Web: www.OpenFOAM.com   \\/ M anipulation   \**/ Build : 2.0.0a317a4e7cd55 Exec : viscoelasticFluidFoam Date : Aug 22 2011 Time : 01:39:04 Host : ubuntu PID : 2568 Case : /home/mam/OpenFOAM/mam2.0.0/RUN/tutorials/incompressible/viscoelasticFluidFoam/FENEP nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 // using new solver syntax: p { solver PCG; preconditioner { type AMG; cycle Wcycle; policy AAMG; nPreSweeps 0; nPostSweeps 2; groupSize 4; minCoarseEqns 20; nMaxLevels 100; scale off; smoother ILU; } tolerance 1e07; relTol 0; minIter 0; maxIter 800; } // using new solver syntax: U { solver PBiCG; preconditioner { type Cholesky; } minIter 0; maxIter 1000; tolerance 1e06; relTol 0; } // using new solver syntax: taufirst { solver PBiCG; preconditioner { type Cholesky; } minIter 0; maxIter 1000; tolerance 1e06; relTol 0; } Reading field p Reading field U Reading/calculating face flux field phi Selecting viscoelastic model multiMode Selecting viscoelastic model FENEP Starting time loop Courant Number mean: 6.54561e07 max: 1.84912e05 deltaT = 1.1999e05 Time = 1.1999e05 > FOAM FATAL IO ERROR: keyword preconditioner is undefined in dictionary ":reconditioner" file: :reconditioner from line 57 to line 57. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting 

August 23, 2011, 01:22 
VicoelasticFluidFoam in OpenFoam2.0.0

#162 
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 10 
Hi
Examine without preconditioner and let me know the result. Good luck Ata 

August 23, 2011, 20:41 

#163 
New Member
mmam
Join Date: Aug 2011
Location: Porto
Posts: 3
Rep Power: 7 
Dear ata
I inserted tha cavity case's preconditioner to my case and it works. another question : does this solver work with KEpsilon? in other words can I solve a turbulent viscoelastic flow by the means of this solver? 

August 24, 2011, 05:00 
Turbulent flow of viscoelastic fluid

#164 
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 10 
Hi
I think it is possible but may be it has a problem. Usually turbulent models are for newtonian fluids and I do not know any turbulent model for viscoelastic fluids. So, may be your results become incorrect. Good luck Ata 

August 29, 2011, 06:11 
Doubt in multimode cases

#165 
Senior Member

Hi,
I have some doubts concerning the procedure in which viscoelasticFluidFoam solver is implemented in multimode cases! I know that in multimode cases; tau is equal to summation of each shear stress spectrum; I want to know where is this summation in this code? Another doubt; it seems that visco.divTau(U) is implemented as number of as modes in a single momentum equation, if it's right, because of DEVSS method, it seems that etha_s for each mode is obtained by dividing solvent viscosity by number of modes. Is it right? would you please clarify how does this solver work in multimode cases? Thanks in advance,
__________________
Amir 

August 30, 2011, 11:19 

#166  
Member

Hello Amir,
Take a look on multimode.C file, the bellow code part that do the summation you are looking for. divTau function return the summation of each mode for the momentum equation and tau() function do the stress summation. Foam::tmp<Foam::fvVectorMatrix> Foam::multiMode::divTau(volVectorField& U) const { tmp<fvVectorMatrix> divMatrix = models_[0].divTau(U); for (label i = 1; i < models_.size(); i++) { divMatrix() += models_[i].divTau(U); } return divMatrix; } Foam::tmp<Foam::volSymmTensorField> Foam::multiMode::tau() const { tau_ *= 0; for (label i = 0; i < models_.size(); i++) { tau_ += models_[i].tau(); } return tau_; } Enjoy, Jovani Quote:


February 5, 2012, 08:00 
transient flow

#167  
Member
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 8 
Hello Dear FOAMers, especially Jovani!
I have read all posts about viscoelastic in CFDONLINE! Jovani, it seems your job is very great and your solver works very good. I thank you, same everyone that enjoys your big work. After that, about transient flow in 2D channel, which is my M.A. thesis and you have explained it in the post that I mentioned in QUOTE. You haven’t given any suggestion about stress B.C. on wall which is important in viscoelastic transient flows. I’m eager to improve results and I request you to help me. Stress B.C. on wall is gained from simplification of constitutive equation with no slip condition: u=v=0 as Christian Kröner mentioned for OldroydB model: S_tilde_yy= 0 S_tilde_xy(t+dt)=e^((1/We)dt)*S_xy(t)+(1lambda2/lambda1)du/dy(t*)*[1e^((1/We)dt)] S_tilde_xx(t+dt)=e^((1/We)dt)*S_xx(t)+dt*[du/dy(t)*e^((1/We)dt)*S_xy(t)+du/dy(t+dt)*S_xy(t+dt)] How should I use this kind of B.C. in OpenFOAM? Is this a GroovyBoundary condition? I’m not an experienced user of OpenFOAM. I appreciate you if help me. Quote:


February 5, 2012, 12:02 

#168 
Member
Join Date: Jul 2009
Posts: 63
Rep Power: 9 
the BC of the viscoelastic extra stress is done by jovani with zeroGradient, however after a wide benchmark i have found that this BC works great for time independet as time dependent simulations, due to the fact of interpolating the real stress form inside the simulation geometry to outside!!!
Better then implementing a new BC that needs to be tested (i dont really understand yours) is to make sure that your mesh at the Walls is good and fine enogh!! furthermore it is very importent for time dependet flows to solve the veolcity field very accurate in each step! I changed alot of things in the BC of the viscoelastic extra stress nothing legitimate the problems that accurs even the higher accuracy of the transported stress. However i really wish you can look to some works form Alves and Olivera how they treat the meshs on the walls or Turek et. al 

February 5, 2012, 13:32 

#169  
Senior Member

Quote:
I also did some simulations in transient field and I didn't face any problem unless the cases with considerable Weissenberg number but I had moving wall but upon your experience I wanna ask you that do you think this BC can be also meaningful in such cases (moving walls)? And I have another question about your comment; because I have to justify using this BC in my thesis and I'm not an expert in openFOAM; would you please elaborate your statement "interpolating the real stress form inside the simulation geometry to outside". Bests,
__________________
Amir 

February 5, 2012, 15:36 

#170 
Member
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 8 
Thanks dear Tajoooko for your quick and perfect reply
If you write constitutive equation, and vanish each term you can ( according NOslip condition ) some term will be remain. and this contain time derivative and some other terms. what's your idea about forgeting this, and simply use zero gradient? If I be right, you're saying that zerogradient doesn't cause any problem in solving problem even for transient flow as you tested it? Can you tell me in which case you have tested and saw that zero gradient BC cause good results? Kind regards 

February 6, 2012, 05:25 

#171 
Member
Join Date: Jul 2009
Posts: 63
Rep Power: 9 
the BC zeroGradient works very good with good meshes (good meshes at the wall regions) even if the wall is moving or not this is not the problem
the problem is to solve the velocity field very accurate in the simulation region> because the copling of the stress is done with pressure based algorthim (that means first solve the velocity field then the stress and repeat to the needed accuracy) however if you want to get you results fast and good use zeroGradient if you want to do a new method then use a new BC you need to diside this but really zerGradient works very good (interpolating the solution form inside to outside means that for hyperbolic equations there is no really need for BC but a need for intial fields) since Finite volume methods needs to get BC the people uses zeroGradient and it is even good to 'bound' the simulated values your idea about the new BC: do you mean that you want to say at the wall (e.g. Tau_xx is zero) ??? and then write the tau equation for xx direction as a BC?? the high weisenberg/deborah number problem is a very big PROBLEM that is till not solved alot of models shows time dependent flows up a caracteritic We or De number... some simulations even devergate because of this numbers (see some simulations done by phan thien and tanner or in the book of ownes phillips) 

February 7, 2012, 02:28 

#172 
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 640
Rep Power: 19 
guys you should read this too. It looks interesting:
http://www.ma.huji.ac.il/~razk/Resea...des/Visco1.pdf 

February 7, 2012, 14:52 

#173 
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 10 
Hi Arjun
I cannot download it. Would you please send it to my email. I will send my email via private message Thank you very much 

February 7, 2012, 15:17 

#174 
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 640
Rep Power: 19 

February 23, 2012, 11:22 

#175 
Member

Hello to everyone,
About the boundary conditions at wall we have at less three options to use: 1  zeroGradient: a zero order approximation from internal field to boundaries. It is necessary to use fine meshes close to walls and it is model independent. 2  extrapolation: a first order approximation using the value and the gradient of the nearest cell to impose the value on the wall boundaries. This is model independent too. 3  analytical solution: evaluate an expression to impose the values of stress on wall boundaries. The expression was commented above and this is model dependent and i think to find an analytical expression for more elaborated models, like DCPP, it will be a difficult task! What the better option? A benchmark can show interesting results, I know Tajoooko did a benchmark on it, please ask him! Arjun, This is very interesting. Do you know about the generalization of this formulation for 3D cases? Best regards, Jovani 

February 23, 2012, 20:09 

#176  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 640
Rep Power: 19 
Quote:
I think the formulation is such that it could be extended to 3D also. further there are some papers on his site that are worth reading: http://www.ma.huji.ac.il/~razk/iWeb/...lications.html Anyway, few days ago i found few days free and I implemented pressure based coupled solver in iNavier. Since now I use coupled AMG for it, the calculations are very stable. It is very useful for high viscosity flow where segregated approach has problems converging. So now I am thinking of creating a viscoelastic flow solver using this coupled solver and this means I would be spending time learning his method and will try implementing it. In coming days or months. 

April 6, 2012, 15:40 
Ignoring DEVSS in unsteady cases

#177 
Member
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 8 
Hi dear Foamers
As you can find in this paper: "Numerical modelling of transient viscoelastic ﬂows" S.C. Xue, R.I. Tanner, N. PhanThien J. NonNewtonian Fluid Mech. 123 (2004) 33–58 It says in modeling unsteady viscoelastic fluid flows we shoudn't use schemes like EVSS, BSD , AVSS because they change form of equation and at last change results. I guess this is true for DEVSS ( I don,t have suficient information about DEVSS!!! ) how we can turnOff DEVSS in solving cases in open foam??? thanks very much ================================================== ==== here is last part of abstract of this paper: "Finally, we analyze and numerically demonstrate that with the decoupled method, for accurate simulations of the transient viscoelastic ﬂow with inertia, the governing equations have to be decoupled and solved strictly according to the type of each equation. The stabilizing measures developed for steady state modelling, such as ‘both sides diffusion’ (BSD), elastic viscous stress split (EVSS), and adaptive viscous split stress (AVSS) may lead to change of type in the equation from a purely hyperbolic one to a parabolic one for a purely elastic (Maxwell) ﬂuid, or lead to overdiffusion in transient velocity ﬁeld calculations for the viscoelastic ﬂuid with a solvent viscosity. Therefore, these kinds of measures should not be taken, and the ‘viscous formulation’ is more proper." 

April 7, 2012, 03:47 

#178 
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 10 
Hi
I do not think so. Some simulations and comparing with analytical results does not show that. But you should use strict conditions for solving linear system of equations especially in the case of stresses. Good luck 

April 7, 2012, 11:15 

#179 
Member
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 8 
But it's not my own idea and this paper is so perfect that I can't ignore it!!!


April 7, 2012, 11:43 

#180  
Senior Member

Quote:
I read this article before; It's more considerable for purely elastic fluids. My simulation also showed such behavior and I disabled this methodology by changing the main solver. (you can also reduce the coefficient of added terms) Bests,
__________________
Amir 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
VOF simulation of a viscoelastic fluid  sinah  OpenFOAM Running, Solving & CFD  10  November 25, 2010 12:02 
FREE SURFACE VISCOELASTIC FLOWS  Valdemir G. Ferreira  Main CFD Forum  6  December 18, 2009 07:14 
Viscoelastic flow modeling in OpenFOAM  vulda  OpenFOAM Running, Solving & CFD  1  March 17, 2008 08:32 
Polyflow & OpenFoam on Viscoelastic flow modeling  Sumeshen  Main CFD Forum  0  March 14, 2008 09:29 
Viscoelastic fluid codes  joel davison  Main CFD Forum  0  November 6, 2001 06:09 