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 Tree44Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2014, 11:07
Default
  #341
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
It runs fine here, the last change was

commit 6b50e03f4417291ba2c9184244d37e2630ef2dae
Author: Henrik Rusche <h.rusche@wikki-gmbh.de>
Date: Thu Dec 12 00:41:18 2013 +0100

Below is the fvSolution file:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.0 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{

p
{
solver PCG;
preconditioner Cholesky;

tolerance 1e-07;
relTol 0;
minIter 0;
maxIter 800;
}

U
{
solver BiCGStab;
preconditioner ILU0;

tolerance 1e-6;
relTol 0;
minIter 0;
maxIter 1000;
}

tau
{

solver BiCGStab;
preconditioner ILU0;

tolerance 1e-6;
relTol 0;
minIter 0;
maxIter 1000;

};

}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

relaxationFactors
{
p 0.3;
U 0.5;
tau 0.3;
}

// ************************************************** *********************** //
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 18, 2014, 11:33
Default
  #342
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Thanks for the information. How can I check what my last change was?
sita is offline   Reply With Quote

Old   April 1, 2014, 04:38
Default
  #343
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
OK, I give up: last Thursday I installed foam-extend-3.0 from source, tested it on the Oldroyd-B tutorial, AND IT WORKED!!! No problems with finding the Cholesky preconditioner or anything.
So today I tried to run a case of my own, but now suddenly foam seems to have forgotten everything it knew previously and it gives the same error I got earlier, about Cholesky being an unknown preconditioner. WHY?? I didn't change anything, as far as I know. Anyone?
sita is offline   Reply With Quote

Old   May 13, 2014, 11:46
Unhappy
  #344
New Member
 
litao
Join Date: Dec 2013
Posts: 2
Rep Power: 0
yxiong is on a distinguished road
Quote:
Originally Posted by sita View Post
OK, I give up: last Thursday I installed foam-extend-3.0 from source, tested it on the Oldroyd-B tutorial, AND IT WORKED!!! No problems with finding the Cholesky preconditioner or anything.
So today I tried to run a case of my own, but now suddenly foam seems to have forgotten everything it knew previously and it gives the same error I got earlier, about Cholesky being an unknown preconditioner. WHY?? I didn't change anything, as far as I know. Anyone?
i have the same problem,when i try smenon's example in the extend-3.0:
--> FOAM FATAL IO ERROR:
Unknown asymmetric matrix preconditioner Cholesky

Valid asymmetric matrix preconditioners are :

7
(
AMG
none
GAMG
diagonal
SymGaussSeidel
ILU0
DILU
)


file: /home/yxiong/FileOfYxiong/projectile/system/fvSolution::solvers::U from line 82 to line 90.

From function lduPreconditioner::New
(
const lduMatrix& matrix,
const FieldField<Field, scalar>& coupleBouCoeffs,
const FieldField<Field, scalar>& coupleIntCoeffs,
const lduInterfaceFieldPtrsList& interfaces,
const dictionary& dict
)
in file matrices/lduMatrix/lduMatrix/lduMatrixPreconditioner.C at line 141.

FOAM exiting

sita,did you have solved your problem?tell me,thank you!
yxiong is offline   Reply With Quote

Old   May 13, 2014, 12:01
Default
  #345
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Just change the name from Cholesky to ILU0.

Hrvoje
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 13, 2014, 22:18
Smile
  #346
New Member
 
litao
Join Date: Dec 2013
Posts: 2
Rep Power: 0
yxiong is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Just change the name from Cholesky to ILU0.

Hrvoje
Thank you very much,Mr Hrvoje Jasak,it seems very nice now!
yxiong is offline   Reply With Quote

Old   May 14, 2014, 01:54
Default
  #347
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Sorry, no, I haven't found a solution yet, maybe the Cholesky preconditioner just disappeared? Although some time ago I saw a post by Hvorje Jasak, who didn't have problems with Cholesky. I switched to using PAMG instead of Cholesky, that works.
sita is offline   Reply With Quote

Old   May 21, 2014, 06:45
Default divTau
  #348
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
I suppose the divergence of (tau_p + tau_s) should be returned for the momentum equation. However in the viscoelastic foam, it is
fvc::div(tau_/rho_, "div(tau)")
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")

It is not identical to div(tau_/rho_ + tau_s), isn't it?
Raymond.Leoi is offline   Reply With Quote

Old   May 21, 2014, 13:25
Default
  #349
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
I am sorry: did you read the paper describing the methodology?
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 21, 2014, 18:39
Default
  #350
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
what's the paper?

Quote:
Originally Posted by hjasak View Post
I am sorry: did you read the paper describing the methodology?
Raymond.Leoi is offline   Reply With Quote

Old   May 22, 2014, 02:29
Default
  #351
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Apologies: paper.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 22, 2014, 05:24
Default
  #352
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
I've gone through some papers for the theory. What paper do you mean, Hjasak?
Quote:
Originally Posted by hjasak View Post
Apologies: paper.
Raymond.Leoi is offline   Reply With Quote

Old   May 22, 2014, 06:01
Default
  #353
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Usually when I work on something in FOAM, there are papers published with the methodology, numerics and validation results.

Try googling Favero Jasak viscoelastic, or

http://scholar.google.co.uk/scholar?...ed=0CCUQgQMwAA

Does this help?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 22, 2014, 06:19
Default
  #354
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
Cheers, Hrv. No luck. Anyway, I suppose that divTau is the key for the viscoleastic solver no matter what model it is. Anyone dig this part?
Quote:
Originally Posted by hjasak View Post
Usually when I work on something in FOAM, there are papers published with the methodology, numerics and validation results.

Try googling Favero Jasak viscoelastic, or

http://scholar.google.co.uk/scholar?...ed=0CCUQgQMwAA

Does this help?

Hrv
Raymond.Leoi is offline   Reply With Quote

Old   May 22, 2014, 07:59
Default Convection term in viscoelasticFluidFoam solver
  #355
Member
 
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13
heliana60 is on a distinguished road
Hi Hrvoje,

I am using a model similar to the White Metzner-Larson model in the visco solver, I want to study shear thinning.

I am studying star-up flow in a 2D channel.

The model looks like this:

fvSymmTensorMatrix tauEqn
(
fvm::ddt(tau_)
+ fvm::div(phi(), tau_)
==
etaP_/lambda_*twoD
+ twoSymm(C)
- fvm::Sp(1/lambdaM, tau_)
);

where:

lambdaM = (lambda_*gammaC_/(gammaC_+lambda_*sqrt(0.5)*mag(twoD)))

In few words, the relaxation time is in function of the shear rate (my gammaC_ is 0.1)

When I do this, the centerline velocity acts like if it was a almost a newtonian fluid, and it doesn't reach the steady state (analytical results).

I checked also the nonNewtonian and Newtonian stress on time at a quarter of the channel and it is like \tau_ doesn't "change" anymore with time, though the newtonianStress does.

I am attaching here the plot of the nonNewtonian and Newtonian shear stress at quarter of the channel vs time, so you can see how it actually goes.

If I actually remove the convective term (I was just trying to see what was affecting the costitutive equation), my results reach steady state.

How can this convective term affect my model, so when I use it it doesnt reach steady state like expected?


Thanks,

Heliana
Attached Files
File Type: pdf tauxy_vs_time.pdf (5.2 KB, 37 views)
heliana60 is offline   Reply With Quote

Old   July 23, 2014, 05:35
Default FENE model parameters
  #356
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Dear Jovani,

In your FENE-P and FENE-CR models, the values of etaS and etaP should be specified. What do these parameters mean physically? My first guess would be that etaS + etaP = eta_eff (i.e. effective viscosity of the solution = solvent viscosity + polymer contribution), but in the FENE-CR code, you use an eta_eff that's defined as eta_eff = etaP. So, is etaP then the viscosity of the polymer solution?

Thanks in advance for helping me out,
Sita
sita is offline   Reply With Quote

Old   July 31, 2014, 02:21
Default
  #357
Member
 
Ron
Join Date: Jul 2014
Location: Japan
Posts: 40
Rep Power: 12
ron_OFuser is on a distinguished road
How to calculate drag coefficient on a cylinder for viscoelastic fluid?

ron_OFuser is offline   Reply With Quote

Old   July 31, 2014, 04:11
Default
  #358
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Quote:
Originally Posted by ron_OFuser View Post
How to calculate drag coefficient on a cylinder for viscoelastic fluid?

Hi Ron,

Maybe this helps?

Viscoelastic flow past a cylinder: drag coefficient. Nhan Phan-Thien & Hua-Shu Dou (1999). Computer Methods in Applied Mechanics and Engineering, 180 (3-4), pp. 243-266.

Good luck,
Sita
sita is offline   Reply With Quote

Old   July 31, 2014, 05:20
Default
  #359
Member
 
Ron
Join Date: Jul 2014
Location: Japan
Posts: 40
Rep Power: 12
ron_OFuser is on a distinguished road
Thank you Sita for the same.

Do you know how would I implement the drag coefficient equation for these fluids in OpenFOAM?

ron_OFuser is offline   Reply With Quote

Old   July 31, 2014, 08:10
Default
  #360
Member
 
Ron
Join Date: Jul 2014
Location: Japan
Posts: 40
Rep Power: 12
ron_OFuser is on a distinguished road
Anyone?
Any idea for the above post on implementation of drag coefficients for viscoelastic fluids?
ron_OFuser 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 04:00
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


All times are GMT -4. The time now is 03:47.