|
[Sponsors] |
[OpenFOAM] Cylindrical slices not accepting float |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 16, 2019, 08:06 |
Cylindrical slices not accepting float
|
#1 |
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8 |
Good day!
I am busy preforming data analysis on an axial flow fan and need to take many cylindrical slices. These slices will vary from roughly 0.31 m to 0.71 m. I've just picked up the basics of programming within paraview, and generated the following script: Code:
source = GetActiveSource() for i in range (31, 71, 5): r = i/100; Slice1 = Slice( source ) Slice1.SliceType = "Cylinder" Slice1.SliceOffsetValues = [0.0] Slice1.SliceType.Center = [0.0, 0.0, 0.0] Slice1.SliceType.Axis = [0.0, 1.0, 0.0] Slice1.SliceType.Radius = r My problem is that these slices all have radius 0. As soon as I take away the division of 100, they slice at the radius given. How would I accomplish what is set out here? EDIT: It seems the reason was that paraview wasn't working with floats, and instead treated everything like integers. To remedy this, I included the line: from __future__ import division at the top, which solved the problem Last edited by yambanshee; February 6, 2019 at 07:07. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
Implementation of Simple Algorithm | JunaidAhmad | Main CFD Forum | 40 | November 4, 2017 14:16 |
slices animation in cylindrical coordinate | cecilia_xiao559 | Tecplot | 2 | January 9, 2015 13:46 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 12:48 |
to correct me an udf program | farida hamadi | FLUENT | 0 | December 18, 2004 06:54 |