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

Viscosity model - Compressible flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2013, 12:50
Default Viscosity model - Compressible flow
  #1
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
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: 165
Rep Power: 16
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: 165
Rep Power: 16
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

Old   March 6, 2018, 08:08
Default
  #4
Member
 
Alberto
Join Date: Sep 2013
Posts: 37
Rep Power: 13
malv83 is on a distinguished road
Quote:
Originally Posted by Aurelien Thinat View Post
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.

Hello Aurelien,

Could you share how did you include the strain rate for compressible models?... It seems like an unanswered question everywhere.

Thank you in advanced
malv83 is offline   Reply With Quote

Reply


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
compressible flow calculation error using rhoSimpleFoam solver student4326 OpenFOAM Running, Solving & CFD 7 November 2, 2015 12:34
Viscosity ratio in gamma-theta transition model based on k-w sst turb model Qiaol618 Main CFD Forum 8 June 9, 2012 07:43
modelling solids viscosity in eulerian multiphase model derkaiser FLUENT 1 December 5, 2011 04:42
compressible flow maria teresa FLUENT 1 September 7, 2007 17:58
urgent help needed with 2d compressible flow James FLUENT 2 June 20, 2007 05:22


All times are GMT -4. The time now is 03:41.