|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
mehdi
Join Date: Nov 2010
Posts: 11
Rep Power: 4 ![]() |
Dear OpenFoamers
I'm already trying to write a code for simulating conformational rheological problems. my code is complied well but when I try to use it this error appears: --> FOAM FATAL ERROR: Argument of trancendental function not dimensionless From function trans(const dimensionSet&) in file dimensionSet/dimensionSet.C at line 480. I found the source of error may exist in these lines of my code: //size of shear rate tensor (which is dimensioned scalar) volScalarField sizegamadot = Foam::sqrt ( 0.5 * (twoD && twoD) ); //ci is a non-dimensioned variable which is calculated by this //formula : ci = ((-0.0076*ln(sizegamadot) + 0.0385)/0.1876)^1.998 volScalarField ci = Foam: ow( ((-0.0076 * Foam::log (sizegamadot)) + 0.0385) / 0.1876 ) ,1.998 );// solving equation for a. tmp<fvSymmTensorMatrix> aEqn ( fvm::ddt(a_) == keisi * ( (twoD & a_) + (a_ & twoD) ) + 4 * ci * sizegamadot * (I_ - 3*a_) ); aEqn().relax(); solve(aEqn); where keisi is a dimensionless scalar ,a_ is dimensionless tensor , twoD is shear rate tensor ( dimesnion = grad velocity = 1/s ) and I_ is identity tensor(dimensionless) although ci is dimensionless in real world but this formula makes openFoam to consider it as a dimensioned scalar.(I don't know really why it happens?!! ) however, my question is how i should convert ci in to a dimensionless scalar which can be use in the aEqn? any help would be appreciated. |
|
|
|
|
|
|
|
|
#2 | |
|
New Member
Chris Prohoda
Join Date: Mar 2013
Posts: 6
Rep Power: 2 ![]() |
Quote:
|
||
|
|
|
||
|
|
|
#3 |
|
Senior Member
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 155
Rep Power: 4 ![]() |
Cpro is right, sizegamadot is not dimless and this is causing the problem.
The easiest way of solving this, is by writing something as Code:
volScalarField sizegamadot = Foam::sqrt ( 0.5 * (twoD && twoD) );
dimensionedScalar one = ("one",1/sizegamadot.dimensions(),1.0);
volScalarField ci = Foam::pow( ((-0.0076 * Foam::log (one*sizegamadot)) + 0.0385) / 0.1876 ) ,1.998 );
Cheers, L |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Specifying nonuniform boundary condition | maka | OpenFOAM Running, Solving & CFD | 51 | November 6, 2012 07:47 |
| To convert Mesh from OpenFoam to GMSH | gara1988 | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:43 |
| How to convert a mesh into openfoam format | jr33 | OpenFOAM Meshing & Mesh Conversion | 1 | October 2, 2012 17:20 |
| Solving for an additional species CO in coalChemistryFoam | N. A. | OpenFOAM | 1 | August 11, 2010 11:52 |
| dieselFoam problem!! | vivek070176 | OpenFOAM | 7 | August 4, 2010 15:29 |