CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

how to split a surface in CFX POST

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By dvolkind

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2012, 03:33
Smile how to split a surface in CFX POST
  #1
Senior Member
 
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17
mohammad is on a distinguished road
Dear all,
I have fnished the calculation of a blade...while meshing in the ICEM , I defined the blade surface as a single surface.

Now I want to see the force and moment on some radial section of the blade, say from R1 to R2....

How can I split the blade surface in the CFX-POST to create that smaller surface?

Thanks a lot
mohammad is offline   Reply With Quote

Old   July 24, 2012, 04:21
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, use isosurfaces of radius to define a new surface on your blade surface between your radii. Then you can do calculations on these new surfaces.

You can also set this up using a contour tool, drawing contours of radius on your surface. Then you can extract the surface between contours as a user defined surface (I think that is correct).
ghorrocks is offline   Reply With Quote

Old   July 24, 2012, 04:44
Default
  #3
Senior Member
 
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17
mohammad is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Yes, use isosurfaces of radius to define a new surface on your blade surface between your radii. Then you can do calculations on these new surfaces.

You can also set this up using a contour tool, drawing contours of radius on your surface. Then you can extract the surface between contours as a user defined surface (I think that is correct).
Dear Glenn,
First of all, thanks for your useful reply.
The second method is correct....geometrically it gives the radially extended area.
But..about the first method... I am wondering after creating those two isosurfaces, how to create a surface between two radii( Iso-surfaces) on the blade?

Thanks

Last edited by mohammad; July 24, 2012 at 05:42.
mohammad is offline   Reply With Quote

Old   July 24, 2012, 05:41
Smile Veryyyyyy Important and STRANGE....
  #4
Senior Member
 
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17
mohammad is on a distinguished road
As a test to see the accuracy of the results, I divided a surface to n smaller part using the second method of Glenn...
The results are dramatically different.... This might be because the integration algorithm and mesh size on the surface Vs. radial surfaces...

To the readers:
I will post more things as I understand the reason of this HUGE difference
mohammad is offline   Reply With Quote

Old   July 24, 2012, 20:31
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The mesh on these sub-surfaces should just be the original mesh chopped up. The sum of the surface bits should equal the whole surface, and if not make a careful check you are doing this correctly.
ghorrocks is offline   Reply With Quote

Old   July 24, 2012, 22:40
Default
  #6
Senior Member
 
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17
mohammad is on a distinguished road
Dear Glenn;
I in one of my files I have a blade whose surface is composed of 4 smaller surfaces. I tried with this file:


Quote:
Originally Posted by ghorrocks View Post
The mesh on these sub-surfaces should just be the original mesh chopped up.
I divided my blade radially to 100 small pieces, meaning each radial strip width equals to (1%* Blade Radius) . This method helped me to fit the newly created surfaces with high accuracy to one of those 4 surfaces which exist on blade surface. The surfaces overlap is nearly 95%.



Quote:
Originally Posted by ghorrocks View Post
.... and if not make a careful check you are doing this correctly.
then I went to "Expression" and i created expressions for the Fx, Fy, Fz; one for that surface which originally belongs to the blade and one for all newly created radial surfaces...

Amazingly the results are different.....

To my knowledge, this could JUST be because of one thing.....when we create some surfaces on "CFX_POST" , the software might work with the interpolated data instead of those original nodal values and hence the results become different. This seems correct to me, because I have highly separated flow on the blade and high mesh density near the blades surface...thus i think the gradient values of the pressure are high in that area, which make the interpolation ( and thus the values on the new surfaces) erroneous.


To investigate this matter more, I created a flat plane and tried to use "Sample " method and " Slice" method. the results were different even with the change in "#of sample points" the results of "Sample" became different....

I would be very happy if these differences can be explained to me.

Regards,

Last edited by mohammad; July 25, 2012 at 00:03.
mohammad is offline   Reply With Quote

Old   September 29, 2012, 10:59
Default
  #7
Senior Member
 
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17
mohammad is on a distinguished road
Quote:
Originally Posted by mohammad View Post
Dear all,
I have fnished the calculation of a blade...while meshing in the ICEM , I defined the blade surface as a single surface.

Now I want to see the force and moment on some radial section of the blade, say from R1 to R2....

How can I split the blade surface in the CFX-POST to create that smaller surface?

Thanks a lot
Location> Iso clip
then define the radius as the varaiable and limit the "Iso clip" with R1 ,R2
mohammad is offline   Reply With Quote

Old   July 15, 2016, 04:18
Default
  #8
New Member
 
shubham jain
Join Date: Dec 2013
Posts: 25
Rep Power: 12
shubham jain is on a distinguished road
Hello,
I have a simulation of Turbine Stator for post processing in cfd post.
Hub, shroud and stator blade walls are all defined as one part "Walls".
I want to split the surface, and want to plot a contour only on the Hub wall.
Or to split the surface, say starting from hub to very small span of blade near hub
Actually I want to plot film cooling effectiveness, which I only need it on hub.
Any ideas would be helpful
thanks
shubham jain is offline   Reply With Quote

Old   February 6, 2018, 01:50
Default
  #9
Member
 
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16
dvolkind is on a distinguished road
Greetings to everyone!

Sorry for necroposting, I just have exactly the same question, and I don't think it's worth a separate thread.

First of all, there is always a difference in the results when computing forces and fluxes on pre-existing vs user-defined surfaces, even if they perfectly match. It happens because of interpolation from integration points to mesh nodes, which is used for any user-defined object. Oppositely, when you use, let's say, force_x() macro on a 2D mesh region, it takes the stresses and pressure directly from IPs, the same way as they appear to the solver. There used to be a document on the Customer Portal, which addresses this behavior. Hope, this information helps someone.

So, the error is explainable, but maybe someone knows an alternative method, which allows to extract IP values on a subset of pre-existing mesh regions? Currently I'm thinking of two options:
1) creating radial 2D regions in CFX-Pre, but mouse selection is troublesome, even with lasso.
2) a Perl macro to loop over faces and add forces acting on each of them depending on radial coordinate of centroid. It would be an easy job for Fluent via UDF, but I'm not sure if Power Syntax provides access to face info.

Thanks!
dvolkind is offline   Reply With Quote

Old   February 7, 2018, 03:09
Default
  #10
Member
 
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16
dvolkind is on a distinguished road
In case someone is interested, below is my monkeycode. Seems like it does the job.
# Macro GUI begin
#
# macro name = Radial Force Distribution
# macro subroutine = MayTheForceBeWithYou
#
# macro parameter = Location
# type = location
# location type = surface, boundary, primitive2d, composite
#
# macro parameter = Rotation axis
# type = combo
# list = X, Y, Z
# default = Z
#
# macro parameter = Num. of points
# type = int
# range = 1, 1000
# default = 20
#
# macro parameter = File name prefix
# type = string
#
# Macro GUI end

! use warnings;
! use strict;
! use Scalar::Util qw(looks_like_number);

! sub MayTheForceBeWithYou{

! my ($chosenLoc, $rotAxis, $nPoints, $namePref) = @_;
! my $minR = 1e10;
! my $maxR = -1e10;
! my $lowLimit = "";
! my $upLimit = "";
! my $xCoeff = 0;
! my $yCoeff = 0;
! my $zCoeff = 0;


COMMAND FILE:
CFX Post Version = 15.0
END

! if ($rotAxis eq "Z") {
! $zCoeff = 0;
LIBRARY:
CEL:
EXPRESSIONS:
myRadExpr = sqrt(x^2+y^2)
END
END
END
!}
! elsif ($rotAxis eq "X") {
! $xCoeff = 0;
LIBRARY:
CEL:
EXPRESSIONS:
myRadExpr = sqrt(z^2+y^2)
END
END
END
!}
! else {
! $yCoeff = 0;
LIBRARY:
CEL:
EXPRESSIONS:
myRadExpr = sqrt(x^2+z^2)
END
END
END
! }

USER SCALAR VARIABLE: myRad
Boundary Values = Conservative
Calculate Global Range = On
Expression = myRadExpr
Recipe = Expression
END

! my $locName = getObjectName($chosenLoc);

EXPORT:
ANSYS Export Data = Element Heat Flux
ANSYS File Format = ANSYS
ANSYS Reference Temperature = 0.0 [K]
ANSYS Specify Reference Temperature = Off
ANSYS Supplemental HTC = 0.0 [W m^-2 K^-1]
Additional Variable List =
BC Profile Type = Inlet Velocity
Export Connectivity = Off
Export Coord Frame = Global
Export File = force_export.csv
Export Geometry = On
Export Location Aliases =
Export Node Numbers = Off
Export Null Data = On
Export Type = Generic
Export Units System = Current
Export Variable Type = Current
External Export Data = None
Include File Information = Off
Include Header = On
Location List = $locName
Null Token = null
Overwrite = On
Precision = 8
Separator = ", "
Spatial Variables = X,Y,Z
Variable List = Force X, Force Y, Force Z
Vector Brackets = ()
Vector Display = Scalar
END
>export

! open(IN, "<", "force_export.csv") or die "Could not open force_export.csv!\n";
! while (my $line = <IN>){
! chomp $line;
! my @fields = split "," , $line;
! next unless (looks_like_number($fields[0]));
! my $r = ($xCoeff*$fields[0]**2 + $yCoeff*$fields[1]**2 + $zCoeff*$fields[2]**2)**0.5;
! $minR = $r if $r < $minR;
! $maxR = $r if $r > $maxR;
! }
! close(IN);
! print "$minR\n";
! print "$maxR\n";

! open(OUT, ">", "Force_vs_R$namePref.dat") or die "Failed to create file Force_vs_R$namePref.dat!\n";
! my $column1 = "R";
! my $column2 = "Force X";
! my $column3 = "Force Y";
! my $column4 = "Force Z";
! printf OUT ("%-15s %-15s %-15s %s\n", $column1, $column2, $column3, $column4);
! close(OUT);

! for (my $i=0; $i<$nPoints; $i++){
! $lowLimit = $minR + $i*($maxR - $minR)/$nPoints;
! $upLimit = $lowLimit + ($maxR - $minR)/$nPoints;
! my $rCurrent = ($upLimit + $lowLimit)/2;
! my $forceX = 0;
! my $forceY = 0;
! my $forceZ = 0;
! open(IN, "<", "force_export.csv") or die "Could not open force_export.csv!\n";
! while (my $line = <IN>){
! chomp $line;
! my @fields = split "," , $line;
! next unless (looks_like_number($fields[0]));
! my $r = ($xCoeff*$fields[0]**2 + $yCoeff*$fields[1]**2 + $zCoeff*$fields[2]**2)**0.5;
! if (($r >= $lowLimit) && ($r < $upLimit)){
! $forceX += $fields[3];
! $forceY += $fields[4];
! $forceZ += $fields[5];
! }
! if ( ($r == $upLimit) && ($i == ($nPoints -1) )){
! $forceX += $fields[3];
! $forceY += $fields[4];
! $forceZ += $fields[5];
! }
! }
! close(IN);
! open(OUT, ">>", "Force_vs_R$namePref.dat") or die "Failed writing to file Force_vs_R$namePref.dat!\n";
! printf OUT ("%-15f %-15f %-15f %f\n", $rCurrent, $forceX, $forceY, $forceZ);
! close(OUT);
! }

! close (OUT);

!}
QBeast likes this.

Last edited by dvolkind; February 8, 2018 at 03:35.
dvolkind is offline   Reply With Quote

Old   February 7, 2018, 03:11
Default
  #11
Member
 
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16
dvolkind is on a distinguished road
Where did the indentation go?
dvolkind is offline   Reply With Quote

Reply

Tags
cfx post, split a surface


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
[snappyHexMesh] Layers don't fully surround surface EVBUCF OpenFOAM Meshing & Mesh Conversion 14 August 20, 2012 05:31
viewing cfx post while working on cfx solver manager HMR CFX 5 March 9, 2011 23:33
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43
creating expresions in cfx build or cfx post alex CFX 1 August 22, 2002 14:01


All times are GMT -4. The time now is 17:41.