|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Hello friends,
Hope everything is ok. I'm opening a new topic despite knowing that there are some other very similar. It happens that none clarifies me as I need... So, I'm using solver simpleFoam to simulate blood in a 2D geometry as a newtonian and non-newtonian fluid and the only model that is giving me problems is power -law. The power-law viscosity model has two parameters and, for blood, I found in the paper of Neofytou & Tsangaris (2006) the following values:
I know that OpenFOAM uses kinematic viscosity and when I analysed the code of power-law model, noticed that the consistency index, k, as the same units of nu. So, I simply divided the value of k by rho (1040 kg/m3), and got a value of 1.411×10−5 m2/s for k. In a first phase, I used this value in my simulation and it diverged rapidly. In a second phase I have initialized all fields with potentialFoam and my simulation still doesn't converge. I noticed, in some tutorials, that k has values in the order of 2500 and I have some questions:
I really need your help to proceed with my work. Sorry for my newbie question! Cheers, FS Last edited by fs.chemech; September 19, 2014 at 22:00. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
People, can someone give me a help on this question, please?
It's really important to get my doubts solved! FS |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings FS,
I quickly went to see your past posts and it seems I told you some months ago how important it is to increase the complexity in your test cases gradually, instead of jumping directly at the final problem ![]() Personally I never use the Power-law viscosity model, therefore I'm not familiar with it. If you can create and/or provide a simple example case, preferably with the expect analytical solution, for example something like the very first "cavity" tutorial explained in the User Guide, it should become pretty clear as to what is what ![]() Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Hi Bruno!
First of all thank you for your answer! I remember well your advices! ![]() However, I think now the problem is slightly different and I think you could help me... I'm using a 2D T-shaped geometry (2 inlets and 1 outlet) and studying, with simpleFoam solver: 1) 3 levels of mesh refinement; 2) different schemes for divergence and pressure gradient; 3) Newtonian, Power-law and Bird-Carreau viscosity models. In a first phase, I studied the coarsest mesh: my simulations successfully converged when applying both type of schemes and the three viscosity models. For the intermediate and refined mesh, I only can attain convergence when applying newtonian viscosity model. I tried to manipulate relaxation factors for Power-law and Bird-Carreau but without success... Residuals for Ux and P stabilize far away from 1e-05! I'm using potentialFoam to initialize the fields in all my non-Newtonian simulations... Attached, there are several files for the intermediate refined mesh using a Power-law viscosity model, as well as a checkMesh file and my residuals evolution... Can you see them and give me some hints, please? Do you think that leaving simpleFoam and use nonNewtonianIcoFoam could be a solution? FS P.S.: as I said in my first message, I don't understand very well why there's an exponent "n" in the units of the consistency index "k"... In http://en.wikipedia.org/wiki/Power-law_fluid itit is possible to see that "K is the flow consistency index (SI units Pa•sn)"... Also, I don't know very well how this influences the value to input in powerLawCoeffs (transportProperties file)... checkMesh.txt p & U.txt transportProperties.txt controlDict fvScheme fvSolution.txt Residuals.gif |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 ![]() |
Hi.
the things about k, nu and n. When I have a look into /src/transportModels/incompressible/viscosityModels/powerLaw/powerLaw.C I see this: // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // Foam::tmp<Foam::volScalarField> Foam::viscosityModels: ![]() { return max ( nuMin_, min ( nuMax_, k_*pow ( max ( dimensionedScalar("one", dimTime, 1.0)*strainRate(), dimensionedScalar("VSMALL", dimless, VSMALL) ), n_.value() - scalar(1.0) ) ) ); } k_: flow consistency index n_: flow behaviour index strain-rate: strainRate() nu_: kin. viscosity k_ has the dimension of nu_. , because the strainRate() [1/sec] is multyplied by 1sec. ( "dimensionedScalar("one", dimTime, 1.0)"). The equation is like this: nu_ = k*{strain-Rate()*sec.}^(n-1) The flow behaviour index n is dimensionless. So everything is in the proper dimension. Is this the answer of your question?? kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 ![]() |
Hi,
-----------fvSchemes--------- Why you use this: laplacianSchemes { default Gauss linear orthogonal; } snGradSchemes { default orthogonal; } instead of: laplacianSchemes { default Gauss linear corrected; } snGradSchemes { default corrected; } ???? Please post the complete case. Then we can see Kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Florian, thank you very much for your answer!!
Regarding the units of "k", I understood your explanation! Thank you very much! ![]() So, I'm using "orthogonal" and not "corrected" because my mesh is orthogonal. I saw (I don't remember where) that in these cases we can use this definition... Do you suggest me to change this? By the complete case, you mean my mesh and all the other folders ("0", "constant" and "system")? Cheers, FS |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 ![]() |
Hi,
Ah I see in your checkMesh-file: Mesh non-orthogonality Max: 0 average: 0 o.k. then everything is fine with that. yes with complete case I mean "0", "constant","system". Mesh is in PolyMesh. I don't need the blockMesh file. I will give it a shot at my PC. Then I will see what's going wrong with this case. kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12 ![]() |
Hi 'fs.chemech',
A comment on your original problem. I also faced a similar issue and could not figure out why the solution was diverging for non-newtonian law. Initalise your flow field with a newtonian model and then switch non-newtonian and it wont diverge. This solved the problem for me. Hope it helps! |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Florian,
my compressed case (zip) is much bigger (~800 KB) than the max size allowed by the Forum. How can I send it to you? Nadish, thank you for your suggestion. You change to non-Newtonian model while Newtonian simulation is running? |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12 ![]() |
In the controlDict file you may set the option rumTimeModifiable to yes and then switch during runtime. But i guess the better option is to run the computation for say 0.1 sec, halt it, change the power law model and start from 0.1 sec. it will give a good initial value to the solution and i am pretty sure it wont diverge (given you have defined appropriate BC's)
|
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Nadish,
I tried your suggestion... I know that with Newtonian model, my simulation converges in 290 iterations... So, I ran it until the 260ª iteration, stoped it, changed viscosity model to powerLaw and adapted startTime in controlDict file and resumed simulation again... Unfortunately, residuals Ux and p began to rise and stabilized again near 1e-04... Do you have any idea why this happens? Thank you for your time! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12 ![]() |
Hi,
You just need to initialize the values using Newtonian model. I don't think running upto 260 iterations is wise. Just run a few... Say 20... Iterations with Newtonian and then switch |
|
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Nadish,
I've done it... Residuals continue to stabilize around 1e-04... |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 ![]() |
Hi,
do you have any experimental results for checking accuracy??? Pherhaps your results are good in case of experimental data. Residuals are not good for checking accuracy. For example there can be some instationarities due to "fluctuations". (Keep in mind, laminar non-Newtonian flow is very similar to turbulent flow). Pherhaps you have transient effects in your simulation. One hint: If you want to have good results in case of residuals, then you can do a pseudo time-stepping. The only thing you have to do is to simulate your case unsteady (fvSchemes-ddtSchemes: Euler or backward). I would use backward for pseudo steady cases. You solve your case unsteady until there is no change in your residuals. Some people call this pseudo-transient continuation. This could help you a lot. Furthermore, with pseudo time-stepping, you do not need to init with newtonian flow. Please let me know if this will work. In a lot of my cases this works really good. ![]() kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 ![]() |
Hi again,
if the fluctuations in your residuals will not decay, then you have transient effects in your flow. In this case your problem is unsteady and not steady. To get good avarage data, a steady simulation is not the best way. A better way is to track your field data over time and make an time-avarage (similar to LES or DNS). This can be very tricky, because the data are correlated over time (Autocorrelation). You need several integral time scale, until your results are good due to statistically accuracy. kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#17 |
Member
Nadish Saini
Join Date: Feb 2014
Location: Raleigh, North Carolina
Posts: 39
Rep Power: 12 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#18 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Hi Florian,
I don't have any experimental results to be based on... Yes, one of my suspicions is also that I have transient effects affecting my results... To solve my case as an unsteady case I have to change my solver to nonNewtonianIcoFoam isn't it? simpleFoam, doesn't run unsteady simulations, I think... You said that residuals are not good for checking accuracy! What, in your opinion, should I be based on? Cheers, FS |
|
![]() |
![]() |
![]() |
![]() |
#19 | |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Quote:
Florian, can you explain me this a little better? Sorry for my newbie questions... |
||
![]() |
![]() |
![]() |
![]() |
#20 |
New Member
Filippo
Join Date: May 2014
Posts: 27
Rep Power: 12 ![]() |
Hi Nadish,
I wanted to say that I performed your suggestion. However, the simulation still does not converge ... Residuals continues to stabilize well above the desirable, around 1e-04! Thank you very much for your help! ![]() |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Herschel-Bulkley non-Newtonian viscosity model has term with sign error | pbryant | OpenFOAM Bugs | 5 | June 18, 2013 23:53 |
Viscosity ratio in gamma-theta transition model based on k-w sst turb model | Qiaol618 | Main CFD Forum | 8 | June 9, 2012 06:43 |
Power Law for Non-Newtonian Viscosity | mannobot | FLUENT | 1 | April 23, 2010 09:40 |
Power Law Viscosity Model | cpplabs | OpenFOAM Running, Solving & CFD | 1 | February 13, 2008 08:09 |
Non-Newtonian power law fluids | Tim | Phoenics | 0 | September 17, 2003 16:08 |