Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AL visualization #226

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add AL visualization #226

wants to merge 7 commits into from

Conversation

petebachant
Copy link
Collaborator

Addresses #87.

@petebachant
Copy link
Collaborator Author

Should modify this to write some rectangular surfaces representing the planform areas of the actuator lines. It would also be nice to be able to write single VTKs for all turbine surfaces for compactness.

@petebachant
Copy link
Collaborator Author

Defining polygons is done in the legacy VTK format as (thanks @chegdan for the tip to create and save a VTK plane in ParaView):

# vtk DataFile Version 4.0
vtk output
ASCII
DATASET POLYDATA

POINTS 4 float
-0.5 -0.5 0
0.5 -0.5 0
-0.5 0.5 0
0.5 0.5 0

POLYGONS 1 5
4 0 1 3 2

POINT_DATA 4
NORMALS Normals float
0 0 1
0 0 1
0 0 1
0 0 1


// Pad the integer name for the VTK reader
std::ostringstream cfc;
cfc << std::setw(12)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there might be some extra whitespace here.

<< vtkFileSequence_;

// Construct file name
vtkFileName = vtkDir_+"/"+name_+"_"+cfc.str()+".vtk";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think there should be spaces between the +s.

<< ePosition[2]
<< nl;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete blank line.


// Write element velocity
vtkFilePtr_()
<< "VECTORS Velocity double "<<nl;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be on a new line, indented?

@@ -118,6 +119,7 @@ turbine
{
$blade1;
writePerf false;
writeVTK true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants