CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Customized Sutherland transport

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2016, 12:16
Default Customized Sutherland transport
  #1
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 15
francesco_capuano is on a distinguished road
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_);
}
However, any modifications of these lines do not seem to have any effect on the results. I am compiling the modified library by executing wmake in the Sutherland directory, and I am checking the kappa field by adding the following lines to createFields.H in my solver:

Code:
volScalarField kappa = thermo.kappa();
kappa.write();
The field of kappa remains unchanged to any modification in the formula.

What's wrong with this?

Thanks in advance for any suggestions.
francesco_capuano is offline   Reply With Quote

Old   January 29, 2016, 16:59
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
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
marupio is offline   Reply With Quote

Old   February 1, 2016, 13:06
Default
  #3
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 15
francesco_capuano is on a distinguished road
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...
francesco_capuano is offline   Reply With Quote

Reply

Tags
sutherland transport, thermal conductivity

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Customized Monitor ashish_kumar388 FLUENT 0 December 1, 2014 03:01
Problems running customized solver for diffusion mmkr825 OpenFOAM Running, Solving & CFD 1 August 30, 2012 14:01
customized sonicFoam for adaptive mesh refinement - how to define mass flow BCs? shockley OpenFOAM 1 December 13, 2010 04:04
Customized User Field Function - Vector hannow STAR-CCM+ 1 December 10, 2009 07:25
Customized solver to run in parallel hsieh OpenFOAM Running, Solving & CFD 3 September 21, 2006 04:59


All times are GMT -4. The time now is 00:01.