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   September 9, 2013, 13:28
Cool stressDifferences utility
  #301
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
hi

I want to calculate first and second normal stress differences in newer OpenFoam version (2.2.0) but in this version there is not the "stressDifferences" utility and I cant find it for compiling. also this utility taken from previous version dosent compile correctly in the new one.

if you have a modified version of this utility or have other suggestion please share it with me.

special Thanks
ali jafari is offline   Reply With Quote

Old   September 9, 2013, 17:36
Default
  #302
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
Quote:
Originally Posted by ali jafari View Post
hi

I want to calculate first and second normal stress differences in newer OpenFoam version (2.2.0) but in this version there is not the "stressDifferences" utility and I cant find it for compiling. also this utility taken from previous version dosent compile correctly in the new one.

if you have a modified version of this utility or have other suggestion please share it with me.

special Thanks
I find it !!!!
ali jafari is offline   Reply With Quote

Old   September 9, 2013, 20:54
Post
  #303
New Member
 
胡长旭
Join Date: Aug 2013
Posts: 26
Rep Power: 13
hcx552362 is on a distinguished road
Quote:
Originally Posted by ali jafari View Post
I find it !!!!
Hi jafari
can you give me this files, I will use it to do sth. My email address is hcx552362@163.com
Thanks a lot
best wishes
hcx552362 is offline   Reply With Quote

Old   September 10, 2013, 02:57
Thumbs up viscoelastic utility
  #304
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
Quote:
Originally Posted by hcx552362 View Post
Hi jafari
can you give me this files, I will use it to do sth. My email address is hcx552362@163.com
Thanks a lot
best wishes
I found it , it work on OF 2.2.0
Attached Files
File Type: zip viscoelastic.zip (6.7 KB, 110 views)
ali jafari is offline   Reply With Quote

Old   September 10, 2013, 09:29
Default viscoelasticFoam divergence problem
  #305
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
I noticed that viscoelasticFoam tends to be diverged for cases with high Weissenberg number. Any way to make the solver robust?
Raymond.Leoi is offline   Reply With Quote

Old   September 10, 2013, 10:30
Default
  #306
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Are you sure you are doing the right thing?

We did Weissenberg number of the order of million, which is huge and 3 orders of magnitude larger than other codes, eg Polyflow.

It would be unusual to have such extreme conditions and if these are serious cases I am happy to help through support contracts.

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

Old   September 10, 2013, 10:52
Lightbulb
  #307
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
Quote:
Originally Posted by Raymond.Leoi View Post
I noticed that viscoelasticFoam tends to be diverged for cases with high Weissenberg number. Any way to make the solver robust?
hi
This can refer to the ratio of viscosity (ethaS/ethaP) .How do you define Wi number ?
ali jafari is offline   Reply With Quote

Old   September 10, 2013, 11:06
Default
  #308
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
It's ascertained that the viscoelasticFoam is properly set up. Couldn't imagine what scenario it is for the fluids with Wi of million. Nevertheless, it makes sense to me that the viscoelastic models are difficult to simulate at large Wi, since tau_p*(velocity gradient tensor) could grow exponentially. I wonder how you made it work even Wi goes to million?

Quote:
Originally Posted by hjasak View Post
Are you sure you are doing the right thing?

We did Weissenberg number of the order of million, which is huge and 3 orders of magnitude larger than other codes, eg Polyflow.

It would be unusual to have such extreme conditions and if these are serious cases I am happy to help through support contracts.

Hrv @ Wikki
Raymond.Leoi is offline   Reply With Quote

Old   September 10, 2013, 11:25
Default
  #309
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
Raymond.Leoi is on a distinguished road
The ratio of viscosity could be constant.

What I did is Wi=(relaxation time)*(shear rate based on the average velocity at inlet).

Quote:
Originally Posted by ali jafari View Post
hi
This can refer to the ratio of viscosity (ethaS/ethaP) .How do you define Wi number ?
Raymond.Leoi is offline   Reply With Quote

Old   September 10, 2013, 21:12
Post
  #310
New Member
 
胡长旭
Join Date: Aug 2013
Posts: 26
Rep Power: 13
hcx552362 is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Are you sure you are doing the right thing?

We did Weissenberg number of the order of million, which is huge and 3 orders of magnitude larger than other codes, eg Polyflow.

It would be unusual to have such extreme conditions and if these are serious cases I am happy to help through support contracts.

Hrv @ Wikki
Hi hjasak
Now I am using the OF. When I using the S-MDCPP model to simulate the contraction flow with the viscoelasticFluidFoam software, the result is so serious, Maybe it is not diverge. I do not hoe to solve it?
thanks
hcx552362 is offline   Reply With Quote

Old   September 11, 2013, 06:12
Lightbulb tauxx , tau_XX !!
  #311
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
hi

I used viscoelastic utility (stressSymmComponents). but when I created a calculator filter , two scaler were appeared , tauxx and tau_XX . what's different between two scaler ?
ali jafari is offline   Reply With Quote

Old   September 13, 2013, 16:34
Default
  #312
New Member
 
Erick Lorenzato
Join Date: Mar 2013
Posts: 8
Rep Power: 13
EricKl. is on a distinguished road
Hello,

I'm continuing work of literature. I took an existing mesh in a monograph and would like to use it in my thesis. The author just released the code blockMesh e viscoelasticProperties
When I put the mesh in my example, squeegee the blockMesh no problem.

When I run the Parafoam to check if the mesh has a problem, the ParaView generates the following information:


Code:
--> FOAM FATAL IO ERROR: 
size 48050 is not equal to the given value of 32040

file: /home/administrador/tutorials/viscoelastic/VIFErick/Extr/0/alpha from line 17 to line 48103.

    From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
    in file /home/administrador/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/Field.C at line 237.

FOAM exiting
What can I do to fix it?

thank you
EricKl. is offline   Reply With Quote

Old   September 14, 2013, 02:28
Post
  #313
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
Quote:
Originally Posted by EricKl. View Post
Hello,

I'm continuing work of literature. I took an existing mesh in a monograph and would like to use it in my thesis. The author just released the code blockMesh e viscoelasticProperties
When I put the mesh in my example, squeegee the blockMesh no problem.

When I run the Parafoam to check if the mesh has a problem, the ParaView generates the following information:


Code:
--> FOAM FATAL IO ERROR: 
size 48050 is not equal to the given value of 32040

file: /home/administrador/tutorials/viscoelastic/VIFErick/Extr/0/alpha from line 17 to line 48103.

    From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
    in file /home/administrador/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/Field.C at line 237.

FOAM exiting
What can I do to fix it?

thank you
hi dear EricKl

after blockMesh please use checkMesh and check any warning and error. I think your problem refer to pre-processing.
ali jafari is offline   Reply With Quote

Old   September 14, 2013, 02:46
Default
  #314
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Quote:
Originally Posted by ali jafari View Post
hi dear EricKl

after blockMesh please use checkMesh and check any warning and error. I think your problem refer to pre-processing.

in general Ali suggestion is good for every simulation, but i feel you refine your mesh and your internalField is non-uniform, then you saw that error
i suggest to copy your alpha1 file from backup file if you have

Code:
cp 0/alpha1.org 0/alpha1
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   September 14, 2013, 15:24
Default
  #315
Member
 
ali jafari
Join Date: Sep 2012
Posts: 50
Rep Power: 14
ali jafari is on a distinguished road
Quote:
Originally Posted by ali jafari View Post
hi

I used viscoelastic utility (stressSymmComponents). but when I created a calculator filter , two scaler were appeared , tauxx and tau_XX . what's different between two scaler ?
any one can not help me ?
ali jafari is offline   Reply With Quote

Old   October 29, 2013, 21:51
Default
  #316
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
Hi guys,

This is a piece of code in Giesekus.C
Code:
return
    (
        fvc::div(tau_/rho_, "div(tau)")
      - fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
      + fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
    );
Why is it fvc instead of fvm? Thanks.
sharonyue is offline   Reply With Quote

Old   October 29, 2013, 23:19
Default
  #317
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by sharonyue View Post
Hi guys,

This is a piece of code in Giesekus.C
Code:
return
    (
        fvc::div(tau_/rho_, "div(tau)")
      - fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
      + fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
    );
Why is it fvc instead of fvm? Thanks.
hi

Quote:
Using "fvc::" will calculate the derivative using the current values. While "fvm::" will discretize the term into the matrix equation. So "fvc::" will generate a field, while "fvm::" will return matrix coefficients. Soo, if you're solving [M] [Q] = [B]

fvm:: generates coefficients for [M]
fvc:: goes in [B]

Its more or less a distinction between explicit and implicit terms.

or

Quote:

Taking an other example, the UEqn from mhdFoam:

Quote:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvc::div(phiB, 2.0*DBU*B)
- fvm::laplacian(nu, U)
+ fvc::grad(DBU*magSqr(B))
);
The velocity U can not be calculated analytically, only by iteration. That means it is implicitely given = fvm.

When calculating U, the field B is kept constant. If it is constant, it may be calculated/readed easily (explicitly) = fvc.

=> So whenever there is a U in the UEqn, I have to write fvm, if it is not fvc. Can someone confirm that or say it better?
more for info see the below links:
http://openfoamwiki.net/index.php/Implicit_equation
http://openfoamwiki.net/index.php/Explicit_equation
adambarfi is offline   Reply With Quote

Old   October 29, 2013, 23:25
Default help me!!! where is the problem: Residuals are oscillating
  #318
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
hi everybody

I have a problem with my residuals. I added the temperature with Boussinesq assumption to viscoelasticFluidFoam solver and when I ran it the 'tau' residuals are oscillating and the interesting point is that it is ahead of the rest!!!!
I've attach the residuals plot.

any body knows where is the problem?

thatks
Mostafa
Attached Images
File Type: jpg Screenshot.jpg (89.9 KB, 43 views)
adambarfi is offline   Reply With Quote

Old   October 30, 2013, 02:31
Default
  #319
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
Code:
return
    (
        fvc::div(tau_/rho_, "div(tau)")
      - fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
      + fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
    );
Hi Mostafa,

You can see that its
Code:
fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
I think its like fvm::laplacian(nu,U), but it is using fvc::laplacian(nu,U). This is where I am confused. I think laplacian term should be implicit term. Thanks in advance,.
sharonyue is offline   Reply With Quote

Old   October 30, 2013, 03:21
Default
  #320
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
hi sharonyue,

by Joani:

Quote:
The procedure used to solve the problem of viscoelastic
fluid flow can be summarized in 4 steps for each time step:

1.
With an initial known velocity fi eld U*, a given pressure p* and
stress tau*, the momentum equation is implicitly solved for each
component of the velocity vector resulting in U**. The pressure
gradient and the stress divergent are calculated explicitly with
values of the previous step.

2.
With the news velocity values U** it is estimated the new
pressure field p** using an equation for the pressure and makes
the correction of velocity fi eld to satisfy the continuity equation,
resulting in U***. The PISO algorithm is used.

3.
With the corrected velocity field U*** is made the calculation of
the stress tensor fi eld tau**  using a constitutive equation desired.

4.
For more accurate solutions to transient
flow the steps 1, 2 and
3 can be iterate in a same time step.
Also, you can get more information in follow pdf file, pages 32-60:
http://powerlab.fsb.hr/ped/kturbo/Op...cFluidFoam.pdf
adambarfi 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 14:42.