Question About Arrhenius viscosity
I'm trying implment Arrhenius viscosity.
Foam::tmp<Foam::volScalarField> Foam::viscosityModels::ArrheniusDin::calcNu() const { const volScalarField& T= U_.mesh().lookupObject<volScalarField>("T"); return nu0_* exp(E_/T); } But when I sove my problem this messagem appear /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.2.2-9240f8b967db Exec : TemppimpleFoam Date : Jul 23 2014 Time : 09:55:19 Host : "cp-jana" PID : 6073 Case : /home/jana/OpenFOAM/jana-2.2.2/run/Simulacao_Temperatura/temp/Vaso50micro nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading field T Reading/calculating face flux field phi Selecting incompressible transport model ArrheniusDin --> FOAM FATAL ERROR: Argument of trancendental function not dimensionless From function trans(const dimensionSet&) in file dimensionSet/dimensionSet.C at line 424. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::trans(Foam::dimensionSet const&) at ??:? #3 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::exp<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&) at ??:? #4 Foam::viscosityModels::ArrheniusDin::calcNu() const at ??:? #5 Foam::viscosityModels::ArrheniusDin::ArrheniusDin( Foam::word const&, Foam::dictionary const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #6 Foam::viscosityModel::adddictionaryConstructorToTa ble<Foam::viscosityModels::ArrheniusDin>::New(Foam ::word const&, Foam::dictionary const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #7 Foam::viscosityModel::New(Foam::word const&, Foam::dictionary const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #8 Foam::singlePhaseTransportModel::singlePhaseTransp ortModel(Foam::GeometricField<Foam::Vector<double> , Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #9 at ??:? #10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #11 at ??:? Someone Can I help me? |
Hi!
It seems that your variable E_ is not declared are either a dimensionedScalar or a volScalarField. So you tried to compute the exponential of a variable that has the dimension of the inverse of the temperature. Which is no sense since the exponential is dimensionless... By the way, I also suggest you to use Foam::exp() instead of exp() in order to specify the compiler that you are going to use the overloaded exp function. Cheers, Cyp |
Quote:
|
have you tried with Foam::exp() instead of exp() ?
|
Quote:
Foam::tmp<Foam::volScalarField> Foam::viscosityModels::ArrheniusDin::calcNu() const { const volScalarField& T= U_.mesh().lookupObject<volScalarField>("T"); return nu0_* Foam::exp(E_/T); } // Variables dimensionedScalar nu0_; dimensionedScalar E_; volScalarField nu_; |
and are you sure that E_ and T have the same dimension ?
|
Quote:
It's worked |
All times are GMT -4. The time now is 08:28. |