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

Viscosity model - Compressible flow

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 19, 2013, 12:50
Default Viscosity model - Compressible flow
  #1
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 154
Rep Power: 7
Aurelien Thinat is on a distinguished road
Hi everyone,

I have some problems developping a viscosity model in OpenFoam-2.2.2. This model is quite simple : for a given value of the strain rate, I have a viscosity value.

So this is what I'm trying :

1) copy paste "src/thermophysicalModels/specie/transport/sutherland" to "src/thermophysicalModels/specie/transport/myTotalTransport"
2) renamed everything, and cleaned the constructors and operators.
3) created a createFields.H file :
Code:
#include "interpolationTable.H"

interpolationTable<scalar> timeSeriesViscosity
(
"constant/viscosity.dat"
);
4) I included the createFields.H file in the others .C and .H files.
5) Modified the function mu in the file "~I.H"
Code:
template<class Thermo>
inline Foam::scalar Foam::myTotalTransport<Thermo>::mu
(
)const
{
volScalarField sr = strainRate();
return timeSeriesViscosity(sr.value());
}
6) Modify the thermoPhysicsTypes.C to add my new model.
7) Compiled : these are the errors
- strainRate : working with incompressible models, but not here
Code:
error : there are no arguments to 'strainRate' that depend on a template parameter, so a declaration of 'strainRate' must be available
- interpolationTable : I have included "interpolationTable.H", so I don't understand this one :
Code:
error: 'interpolationTable' does not name a type
Any help would be greatly appreciated.
Aurelien Thinat is offline   Reply With Quote

Old   November 20, 2013, 05:33
Default
  #2
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 154
Rep Power: 7
Aurelien Thinat is on a distinguished road
I'll start fixing the problem with the strainRate first. It seems it's not defined for compressible flow : as far as I understand the code, there is no volScalarFields defined at this level.

So I need to compute manually the value of the strain rate at the current cell. How can I get an access to
- the velocity ?
- symm() ?
- fvc::grad() ?
Aurelien Thinat is offline   Reply With Quote

Old   November 21, 2013, 05:14
Default
  #3
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 154
Rep Power: 7
Aurelien Thinat is on a distinguished road
Hello everyone,

I did it with incompressible fluids. Then I compiled another thermo model for compressible fluids.
And now I'm stuck with the selection table. Where is the file I need to modify to enable the choice ?

heRhoThermo -
pureMixture -
myTransportModel -
hconst -
perfectFluid -
specie -
sensibleInternalEnergy

I tried to modify the file /src/thermoPhysicalModels/specie/include/thermoPhysicsTypes.H, but there is no mention of perfectFluid in this file, I guess it's the wrong place.

Thank you.

EDIT : It seems it's the file rhoTermos.C.
Aurelien Thinat 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
Viscosity ratio in gamma-theta transition model based on k-w sst turb model Qiaol618 Main CFD Forum 8 June 9, 2012 06:43
compressible flow calculation error using rhoSimpleFoam solver student4326 OpenFOAM 6 February 10, 2012 10:36
modelling solids viscosity in eulerian multiphase model derkaiser FLUENT 1 December 5, 2011 04:42
compressible flow maria teresa FLUENT 1 September 7, 2007 16:58
urgent help needed with 2d compressible flow James FLUENT 2 June 20, 2007 04:22


All times are GMT -4. The time now is 04:20.