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

Implementation of new transportModel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 19, 2016, 08:57
Default Implementation of new transportModel
  #1
New Member
 
Johannes Martens
Join Date: Jun 2015
Posts: 27
Rep Power: 3
KingKraut is on a distinguished road
Hi all,

I am currently trying to implement a new transport model describing non-newtonian behaviour according to the formula (attached file BloodViscosity.PNG) with the functions (attached file BloodViscosity_Functions.PNG).

BloodViscosity.PNG

BloodViscosity_Functions.PNG

I created the file structure for the transportModel as described in http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf and took care of the division by the strainRate() similar to the implementation as it is done in the crossPowerLaw transportModel, which comes with the OpenFOAM compilation.

Quote:
Foam::tmp<Foam::volScalarField>
Foam::viscosityModels::generalizedPowerLaw::calcNu () const
{
return
(nuInf_ + deltaNu_*exp(-(scalar(1) + strainRate()/a_)*exp(-b_/max(strainRate(), 1/dimensionedScalar("VGREAT", dimTime, VGREAT) ) ) ) )
* pow(max(strainRate()/one_, dimensionedScalar("VSMALL", dimless, VSMALL)),
(nInf_ - deltaN_*exp(-(scalar(1) + strainRate()/c_)*exp(-d_/max(strainRate(), 1/dimensionedScalar("VGREAT", dimTime, VGREAT) ) ) ) ) - 1.0);

}

The library is compiled fine with wmake libso and the inclusion in the controlDict works fine, too. If I then start a simulation run, the calculations work fine until after a couple of timesteps the core is dumped. Either the bounding k explodes or the time step continuity error becomes too large.
This happens with a custom solver (based on pisoFoam) as well as with pisoFoam itself.
I guess the implementation of the formula is somehow bogus, but I don't know how I could do this more elegantly.
Or possibly the boundary conditions for k and nuSgs are chosen wrong? However, this seems weird to me, because the same BCs work fine in the Newtonian case.
Can anybody give me a hint to a direction, where I should be looking for an improvement? Or maybe someone sees a clear mistake in the code above, which I am missing?

Thanks a lot to anyone looking into this!

Best regards
JOhannes
KingKraut is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues in FGM combustion model implementation Lisandro Maders OpenFOAM Programming & Development 8 September 29, 2015 10:30
a little confused with the implementation of compressibleInterFoam su_junwei OpenFOAM Running, Solving & CFD 2 May 7, 2014 17:33
Free CFD code with implementation of Menter's k-omega SST model nikola_m Main CFD Forum 1 November 9, 2012 10:39
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch thomek OpenFOAM Programming & Development 0 October 18, 2010 05:10
Please explain the implementation of species transport Eqn in reactingFoam kallipygian OpenFOAM Running, Solving & CFD 0 October 13, 2008 07:29


All times are GMT -4. The time now is 18:54.