|
[Sponsors] |
July 8, 2009, 10:38 |
natural logarithm function
|
#1 |
Senior Member
|
Dear all,
We know that for log function: dimentionedScalar log (const dimentionedScalar & ds) I try to get the log value of (r/R), where r is the distance between the point and cylinder center, R is the cylinder radius. When I take a look at "analyticalCylinder" in programmers' guide, we see that r = volScalarField magCentres; R = dimensionedScalar radius However, magCentres/radius (or magCentres/radius.value()) is not dimentionedScalar, so my question is: do we have log function for this case? Or how could I convert volScalarField into dimentionedScalar, which is required by log function? Thank you for your attention. Bin |
|
July 9, 2009, 03:20 |
solved
|
#2 |
Senior Member
|
This is solved.
Thank you for your attention. Bin |
|
October 21, 2009, 03:27 |
|
#3 |
Senior Member
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 17 |
Hi, dear Zhoubin, do you know how to convert dimentionedScalar into volScalarField? thanks. chiven
|
|
October 21, 2009, 06:51 |
|
#4 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
If you solve something, then state how you have solved it. There is NOTHING worse (in my opinion) on message boards than searching through threads such as this!
__________________
Laurence R. McGlashan :: Website |
|
July 2, 2010, 06:20 |
|
#5 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
Hello friends,
I need to define the following variable; it is the natural logarithm of the time and a constant value: volScalarField miso = ln(runTime+0.001); But when I try to compile my solver I have the following error: pdEqn.H:83: error: invalid initialization of reference of type ‘const Foam::fileName&’ from expression of type ‘Foam::dimensionedScalar’ Does anybody know what I have to do? |
|
July 5, 2010, 05:30 |
|
#7 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
ln is the natural logarithm. I have successfully compiled my solver by introducing a surfaceScalarField unit variable:
miso = ln(unit*(runTime + 0.001*scalar(1)))); I am not sure if this is the best option.Does anyone have any better solution, or any comment? |
|
July 5, 2010, 07:13 |
|
#9 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
Thank you very much. I prefer your suggestion.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |