CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree43Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2011, 11:45
Default
  #161
New Member
 
mmam
Join Date: Aug 2011
Location: Porto
Posts: 3
Rep Power: 14
mmasoudian is on a distinguished road
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 (FENE-P): the error is:


mam@ubuntu:~/OpenFOAM/mam-2.0.0/RUN/tutorials/incompressible/viscoelasticFluidFoam/FENE-P$ 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.0-a317a4e7cd55
Exec : viscoelasticFluidFoam
Date : Aug 22 2011
Time : 01:39:04
Host : ubuntu
PID : 2568
Case : /home/mam/OpenFOAM/mam-2.0.0/RUN/tutorials/incompressible/viscoelasticFluidFoam/FENE-P
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

// using new solver syntax:
p
{
solver PCG;
preconditioner
{
type AMG;
cycle W-cycle;
policy AAMG;
nPreSweeps 0;
nPostSweeps 2;
groupSize 4;
minCoarseEqns 20;
nMaxLevels 100;
scale off;
smoother ILU;
}
tolerance 1e-07;
relTol 0;
minIter 0;
maxIter 800;
}

// using new solver syntax:
U
{
solver PBiCG;
preconditioner
{
type Cholesky;
}
minIter 0;
maxIter 1000;
tolerance 1e-06;
relTol 0;
}

// using new solver syntax:
taufirst
{
solver PBiCG;
preconditioner
{
type Cholesky;
}
minIter 0;
maxIter 1000;
tolerance 1e-06;
relTol 0;
}

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting viscoelastic model multiMode
Selecting viscoelastic model FENE-P

Starting time loop

Courant Number mean: 6.54561e-07 max: 1.84912e-05
deltaT = 1.1999e-05
Time = 1.1999e-05



--> 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
mmasoudian is offline   Reply With Quote

Old   August 23, 2011, 01:22
Smile VicoelasticFluidFoam in OpenFoam2.0.0
  #162
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Hi
Examine without preconditioner and let me know the result.
Good luck

Ata
ata is offline   Reply With Quote

Old   August 23, 2011, 20:41
Default
  #163
New Member
 
mmam
Join Date: Aug 2011
Location: Porto
Posts: 3
Rep Power: 14
mmasoudian is on a distinguished road
Dear ata
I inserted tha cavity case's preconditioner to my case and it works. another question : does this solver work with K-Epsilon? in other words can I solve a turbulent viscoelastic flow by the means of this solver?
mmasoudian is offline   Reply With Quote

Old   August 24, 2011, 05:00
Default Turbulent flow of viscoelastic fluid
  #164
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
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
ata is offline   Reply With Quote

Old   August 29, 2011, 06:11
Default Doubt in multi-mode cases
  #165
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Hi,
I have some doubts concerning the procedure in which viscoelasticFluidFoam solver is implemented in multi-mode cases!
I know that in multi-mode 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 multi-mode cases?

Thanks in advance,
__________________
Amir
Amir is offline   Reply With Quote

Old   August 30, 2011, 11:19
Default
  #166
Member
 
Jovani L. Favero
Join Date: Mar 2009
Location: Rio de Janeiro, RJ, Brazil
Posts: 45
Rep Power: 18
jovani is on a distinguished road
Send a message via Skype™ to jovani
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:
Originally Posted by Amir View Post
Hi,
I have some doubts concerning the procedure in which viscoelasticFluidFoam solver is implemented in multi-mode cases!
I know that in multi-mode 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 multi-mode cases?

Thanks in advance,
lth and Amir like this.
jovani is offline   Reply With Quote

Old   February 5, 2012, 07:00
Smile transient flow
  #167
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
Hello Dear FOAMers, especially Jovani!
I have read all posts about viscoelastic in CFD-ONLINE!
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 Oldroyd-B model:

S_tilde_yy= 0
S_tilde_xy(t+dt)=e^((-1/We)dt)*S_xy(t)+(1-lambda2/lambda1)du/dy(t*)*[1-e^((-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 Groovy-Boundary condition?
I’m not an experienced user of OpenFOAM. I appreciate you if help me.


Quote:
Originally Posted by jovani View Post
First thank you Hrvoje!!


About the boundary condition for stress on fixed walls, zeroGradient works well in OF
(I used this in my simulations and results in my thesis). The suggestion by Christian is
derived of approximations for constitutive model to take an analytical solution on the wall and I believe
this work well too and also I think results from this is the same is obtained with zeroGradient (this in steady-state flow, anybody want test this?),
but a point is that boundary condition is for unsteady flow and for compare results an appropriate simulation must be done to
take well account the transient results. See http://www.cfd-online.com/Forums/ope...fluidfoam.html post to transient results.
amin144 is offline   Reply With Quote

Old   February 5, 2012, 11:02
Default
  #168
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 16
anon_c is on a distinguished road
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
Amir and amin144 like this.
anon_c is offline   Reply With Quote

Old   February 5, 2012, 12:32
Default
  #169
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by Tajoooko View Post
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
Dear Tajoooko,

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,
amin144 likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   February 5, 2012, 14:36
Smile
  #170
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
Thanks dear Tajoooko for your quick and perfect reply
If you write constitutive equation, and vanish each term you can ( according NO-slip 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 zero-gradient 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
amin144 is offline   Reply With Quote

Old   February 6, 2012, 04:25
Default
  #171
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 16
anon_c is on a distinguished road
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)
Amir and amin144 like this.
anon_c is offline   Reply With Quote

Old   February 7, 2012, 01:28
Default
  #172
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
guys you should read this too. It looks interesting:

http://www.ma.huji.ac.il/~razk/Resea...des/Visco1.pdf
lth and Amir like this.
arjun is offline   Reply With Quote

Old   February 7, 2012, 13:52
Default
  #173
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
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
ata is offline   Reply With Quote

Old   February 7, 2012, 14:17
Default
  #174
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by ata View Post
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

Sent .
arjun is offline   Reply With Quote

Old   February 23, 2012, 10:22
Default
  #175
Member
 
Jovani L. Favero
Join Date: Mar 2009
Location: Rio de Janeiro, RJ, Brazil
Posts: 45
Rep Power: 18
jovani is on a distinguished road
Send a message via Skype™ to jovani
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
amin144 likes this.
jovani is offline   Reply With Quote

Old   February 23, 2012, 19:09
Default
  #176
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by jovani View Post
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

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 visco-elastic 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.
arjun is offline   Reply With Quote

Old   April 6, 2012, 15:40
Smile Ignoring DEVSS in unsteady cases
  #177
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
Hi dear Foamers

As you can find in this paper:
"Numerical modelling of transient viscoelastic flows"
S.-C. Xue, R.I. Tanner, N. Phan-Thien
J. Non-Newtonian 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 turn-Off 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
flow 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)
fluid, or lead to overdiffusion in transient velocity field calculations for the viscoelastic fluid with a solvent viscosity. Therefore, these kinds
of measures should not be taken, and the ‘viscous formulation’ is more proper."
amin144 is offline   Reply With Quote

Old   April 7, 2012, 03:47
Default
  #178
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
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
ata is offline   Reply With Quote

Old   April 7, 2012, 11:15
Unhappy
  #179
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
Quote:
Originally Posted by ata View Post
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
But it's not my own idea and this paper is so perfect that I can't ignore it!!!
amin144 is offline   Reply With Quote

Old   April 7, 2012, 11:43
Default
  #180
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by amin144 View Post
Hi dear Foamers
ys 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 turn-Off DEVSS in solving cases in open foam???
"
Hi Amin;

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,
amin144 likes this.
__________________
Amir
Amir is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 00:19.