|
[Sponsors] |
January 29, 2016, 13:16 |
Customized Sutherland transport
|
#1 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Dear all,
I am trying to customize the equation used to calculate the thermal conductivity when employing the Sutherland model. Apparently, OpenFOAM adopts the so-called modified Euken model, that is implemented in line 149 of (version 2.4): thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H Code:
template<class Thermo> inline Foam::scalar Foam::sutherlandTransport<Thermo>::kappa ( const scalar p, const scalar T ) const { scalar Cv_ = this->Cv(p, T); return mu(p, T)*Cv_*(1.32 + 1.77*this->R()/Cv_); } Code:
volScalarField kappa = thermo.kappa(); kappa.write(); What's wrong with this? Thanks in advance for any suggestions. |
|
January 29, 2016, 17:59 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
Are you sure the code you are editing is the code that is compiling, and are you sure the code that is compiling is the code you are linking to / running?
You could insert an obvious line in there: Info << "Test line!" << endl; If you don't see that get posted to the console, then you know you are not editing what you are running. Sometimes old binaries have a habit of kicking around and messing things up. Try: $ which nameOfApplicationYouAreRunning e.g. $which blockMesh Then: ls -al outputOfLastCommand This will tell you when your executable was modified last. Also, search for the .so that you are linking to. libspecie.so... I think. Check the date on that one. Check for multiples. Another question, you are modifying the specie library, and then you are testing by calling the thermo object's kappa. The specie library returns only a single cell value. Thermo's kappa returns a full field. When does it do a forAll(cells) and update the kappa? Are you testing when it hasn't updated yet?
__________________
~~~ Follow me on twitter @DavidGaden |
|
February 1, 2016, 14:06 |
|
#3 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Dear David, thanks for your suggestion.
I had already tried your hints. It's weird. The libspecie.so library appears as modified, but debugging messages are not displayed. I'm not sure whether the application is actually calling the specie's kappa function or not... |
|
Tags |
sutherland transport, thermal conductivity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customized Monitor | ashish_kumar388 | FLUENT | 0 | December 1, 2014 04:01 |
Problems running customized solver for diffusion | mmkr825 | OpenFOAM Running, Solving & CFD | 1 | August 30, 2012 15:01 |
customized sonicFoam for adaptive mesh refinement - how to define mass flow BCs? | shockley | OpenFOAM | 1 | December 13, 2010 05:04 |
Customized User Field Function - Vector | hannow | STAR-CCM+ | 1 | December 10, 2009 08:25 |
Customized solver to run in parallel | hsieh | OpenFOAM Running, Solving & CFD | 3 | September 21, 2006 05:59 |