|
[Sponsors] |
bug in cylindricalCS class or fatal setup error?!! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 30, 2017, 20:38 |
About the bug in cylindricalCS (compiled in OpenFOAM 4.0)
|
#21 | |
New Member
Join Date: Jun 2017
Posts: 2
Rep Power: 0 |
Quote:
I changed it to forAll (ccCyl.internalField(), i) { ccCyl.ref()[i]=cyl.localVector(cc.internalField()[i]); } Now it can compile successfully, but any better way to modify it? Thanks. Best regards, Enzu |
||
August 31, 2017, 09:44 |
convertToCylindrical for OF4.0
|
#22 |
Member
Join Date: Sep 2016
Posts: 63
Rep Power: 10 |
Hello Enzu
please find my adaption to OF4.0 in the attachment. sitajeje |
|
August 31, 2017, 21:03 |
|
#23 |
New Member
Join Date: Jun 2017
Posts: 2
Rep Power: 0 |
Thanks, Sitajeje. This helps.
Enzu |
|
September 29, 2017, 06:44 |
|
#24 |
Member
Tom
Join Date: Apr 2017
Posts: 50
Rep Power: 9 |
has anyone found a fix for this code to work in OF5 ?
I get this error when i wmake convertToCylindrical.C: In function ‘int main(int, char**)’: convertToCylindrical.C:118:21: error: ‘class Foam::IOobject’ has no member named ‘headerOk’ if (Uheader.headerOk()) ^ /opt/openfoam5/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/convertToCylindrical.o' failed make: *** [Make/linux64GccDPInt32Opt/convertToCylindrical.o] Error 1 Last edited by tom.opt; September 29, 2017 at 06:47. Reason: clarify error |
|
November 23, 2017, 10:12 |
|
#25 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
I got the same error message. Any idea how to fix it?
Best regards, Mark |
|
November 23, 2017, 12:56 |
|
#26 | |
Member
Tom
Join Date: Apr 2017
Posts: 50
Rep Power: 9 |
Quote:
The way I worked around it was to use paraview for postProcessing, and I just used formulas In the calculator to convert the values that I needed from XYZ to cylindrical. I think the script was written for an older version of openfoam and doesn't work with newer versions |
||
November 24, 2017, 02:48 |
|
#27 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Thank you Tom. This is also a solution but I would prefere the script solution due to automatize the process.
So no one who updated the script to newer versions of OF? |
|
December 15, 2017, 22:03 |
Changing from Cartesian to cylindrical coordinates using a different origin
|
#28 | |
New Member
Ehimen
Join Date: Jun 2016
Posts: 12
Rep Power: 10 |
This is a quick comment for anyone who is trying to use the OpenFOAM library to change from a Cartesian coordinate system to a cylindrical coordinate system with a different origin. The conversion will not work using the code posted in this forum as the library assumes that the origin is still at [0 0 0].
A quick fix will be to translate the Cartesian coordinate system using the origin of the new cylindrical coordinates then doing the coordinate system conversion. For instance // Creating cylindrical coordinates cylindricalCS ccs ( "ccs", point(5.0, 0.0, 1.58), // centre point of ccs vector(0, -1, 0), // axis of ccs vector(0, 0, -1), // base axis for cylindrical angle false ); // The cartersian coordinates used by the simulation volVectorField cco = mesh.C(); dimensionedVector origin("origin", dimLength, vector(5.0, 0.0, 1.58)); volVectorField cc = cco - origin; polarCoord.primitiveFieldRef() = ccs.localVector(cc.internalField()); forAll(polarCoord.boundaryField(), patchI) { polarCoord.boundaryFieldRef()[patchI] = ccs.localVector(cc.boundaryField()[patchI]); } polarCoord.write(); This should work Quote:
|
||
January 8, 2018, 09:42 |
|
#29 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Hi Ehimen, thank you for your help.
honestly I do not understand which file I have to modify according to your enries, is it the cylindricalCS.C file? Than I do not know where? Sorry for my unknowledge. |
|
August 9, 2018, 15:00 |
|
#30 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
|
||
October 24, 2018, 06:24 |
|
#31 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Sorry for my late reply. Thank you gu1, now it works.
But now I got Ucyl and Ualpha both with x,y, z option. Even if I take a look into the "convertTocylindric" file it is not quite clear to me what I see. (e.g. if I select Ucyl (x) looks quite different from Ucyl (y). Can you please explain me what I got if I choose Ualpha/Ucyl (x,y,z)? Thank you |
|
October 24, 2018, 06:51 |
|
#32 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
I would like to add, Ualpha (y,z) is zero.
My aim is to export U radial data, but I need an allocation to theta and range. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 06:07 |
Which is the fatal error when foamInstallationTest | eddy | OpenFOAM Installation | 2 | March 30, 2008 22:13 |
Installation problem with GCC | Norma McKee (Mckee) | OpenFOAM Installation | 10 | March 4, 2007 08:09 |
a question of open ".cas" and ".dat" files | fanzhong Meng | FLUENT | 4 | May 15, 2006 12:40 |
Fatal error error writing to tmp No space left on device | maka | OpenFOAM Installation | 2 | April 3, 2006 09:48 |