|
[Sponsors] |
May 7, 2012, 08:15 |
Problem with pow and volScalarField
|
#1 |
New Member
Join Date: Jun 2010
Location: Germany
Posts: 6
Rep Power: 15 |
Hi,
I want to implement an new Order to Calculate the Viscosity nu. Ostwald Waele Potential Function tau = k * strain rate ^n k and n are model Parameter and depend on rho k=a*rho+b n=c*rho+d I got a, b, c, d from some experiments. The equation for the rotation rheometer: nu = tau / strain rate What I have done: Code:
//read strain rate tmp<volScalarField> sr(strainRate()); //Parameter dimensionedScalar ka_("ka_",dimensionSet(0,2,-1,0,0,0,0), 0.1202); dimensionedScalar kb_("kb_",dimensionSet(1,-1,-1,0,0,0,0), 24.912); dimensionedScalar na_("na_",dimensionSet(-1,3,0,0,0,0,0), 0.0005); dimensionedScalar nb_("nb_",dimensionSet(0,0,0,0,0,0,0), 0.2246); //read ScalarFeldes rho_ps const tmp <volScalarField> & rhoCalc = U_.mesh().lookupObject<volScalarField>("rho_ps"); //calculation n and k volScalarField K = ka_ * rhoCalc + kb_; volScalarField N = na_ * rhoCalc + nb_; //Calculation nu tmp <volScalarField> nu = K * Foam::pow(max(tone * sr(),VSMALL),N-1.); My Problem is that it did not compile. If I change N in the pow function to an dimensioned scalar it works fine. Is it possible that, Foam:ow (volScalarField, volScalarField) does not work? Here the error massage: /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricScalarField.C:189: error: no matching function for call to ‘Foam::dimensioned<double>::dimensioned(const char [2], double, const Foam::dimensionSet&)’ /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.C:107: note: candidates are: Foam::dimensioned<Type>::dimensioned(const Foam::word&, const Foam::dimensionSet&, Foam::Istream&) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.C:94: note: Foam::dimensioned<Type>::dimensioned(const Foam::word&, Foam::Istream&) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.C:82: note: Foam::dimensioned<Type>::dimensioned(Foam::Istream &) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.H:95: note: Foam::dimensioned<Type>::dimensioned(const Type&) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.C:69: note: Foam::dimensioned<Type>::dimensioned(const Foam::word&, const Foam::dimensioned<Type>&) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedType.C:55: note: Foam::dimensioned<Type>::dimensioned(const Foam::word&, const Foam::dimensionSet&, Type) [with Type = double] /SimSoftware/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/dimensionedScalarFwd.H:42: note: Foam::dimensioned<double>::dimensioned(const Foam::dimensioned<double>&) Last edited by _Stefan_; May 7, 2012 at 09:24. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
if statement for volScalarField | AnjaMiehe | OpenFOAM Programming & Development | 2 | April 24, 2012 07:01 |