Skip to content
Snippets Groups Projects
Commit 976035d5 authored by mattijs's avatar mattijs
Browse files

ENH: potentialFoam/cylinder: added #codeStream for blockMeshDict

parent 0211d507
Branches
Tags
No related merge requests found
......@@ -16,47 +16,49 @@ FoamFile
convertToMeters 1;
vertices
(
(0.5 0 -0.5)
(1 0 -0.5)
(2 0 -0.5)
(2 0.707107 -0.5)
(0.707107 0.707107 -0.5)
(0.353553 0.353553 -0.5)
(2 2 -0.5)
(0.707107 2 -0.5)
(0 2 -0.5)
(0 1 -0.5)
(0 0.5 -0.5)
(-0.5 0 -0.5)
(-1 0 -0.5)
(-2 0 -0.5)
(-2 0.707107 -0.5)
(-0.707107 0.707107 -0.5)
(-0.353553 0.353553 -0.5)
(-2 2 -0.5)
(-0.707107 2 -0.5)
(0.5 0 0.5)
(1 0 0.5)
(2 0 0.5)
(2 0.707107 0.5)
(0.707107 0.707107 0.5)
(0.353553 0.353553 0.5)
(2 2 0.5)
(0.707107 2 0.5)
(0 2 0.5)
(0 1 0.5)
(0 0.5 0.5)
(-0.5 0 0.5)
(-1 0 0.5)
(-2 0 0.5)
(-2 0.707107 0.5)
(-0.707107 0.707107 0.5)
(-0.353553 0.353553 0.5)
(-2 2 0.5)
(-0.707107 2 0.5)
);
vertices #codeStream
{
codeInclude
#{
#include "pointField.H"
#};
code
#{
pointField points(19);
points[0] = point(0.5, 0, -0.5);
points[1] = point(1, 0, -0.5);
points[2] = point(2, 0, -0.5);
points[3] = point(2, 0.707107, -0.5);
points[4] = point(0.707107, 0.707107, -0.5);
points[5] = point(0.353553, 0.353553, -0.5);
points[6] = point(2, 2, -0.5);
points[7] = point(0.707107, 2, -0.5);
points[8] = point(0, 2, -0.5);
points[9] = point(0, 1, -0.5);
points[10] = point(0, 0.5, -0.5);
points[11] = point(-0.5, 0, -0.5);
points[12] = point(-1, 0, -0.5);
points[13] = point(-2, 0, -0.5);
points[14] = point(-2, 0.707107, -0.5);
points[15] = point(-0.707107, 0.707107, -0.5);
points[16] = point(-0.353553, 0.353553, -0.5);
points[17] = point(-2, 2, -0.5);
points[18] = point(-0.707107, 2, -0.5);
// Duplicate z points
label sz = points.size();
points.setSize(2*sz);
for (label i = 0; i < sz; i++)
{
const point& pt = points[i];
points[i+sz] = point(pt.x(), pt.y(), -pt.z());
}
os << points;
#};
};
blocks
(
......
......@@ -49,8 +49,10 @@ functions
{
difference
{
// Load the library containing the 'coded' functionObject
functionObjectLibs ("libutilityFunctionObjects.so");
type coded;
// Name of on-the-fly generated functionObject
redirectType error;
code
#{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment