|
[Sponsors] |
July 24, 2012, 03:33 |
how to split a surface in CFX POST
|
#1 |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17 |
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 |
|
July 24, 2012, 04:21 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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). |
|
July 24, 2012, 04:44 |
|
#3 | |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17 |
Quote:
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. |
||
July 24, 2012, 05:41 |
Veryyyyyy Important and STRANGE....
|
#4 |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17 |
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 |
|
July 24, 2012, 20:31 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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.
|
|
July 24, 2012, 22:40 |
|
#6 | ||
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17 |
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:
Quote:
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. |
|||
September 29, 2012, 10:59 |
|
#7 | |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 246
Rep Power: 17 |
Quote:
then define the radius as the varaiable and limit the "Iso clip" with R1 ,R2 |
||
July 15, 2016, 04:18 |
|
#8 |
New Member
shubham jain
Join Date: Dec 2013
Posts: 25
Rep Power: 12 |
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 |
|
February 6, 2018, 01:50 |
|
#9 |
Member
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16 |
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! |
|
February 7, 2018, 03:09 |
|
#10 |
Member
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16 |
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); !} Last edited by dvolkind; February 8, 2018 at 03:35. |
|
February 7, 2018, 03:11 |
|
#11 |
Member
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16 |
Where did the indentation go?
|
|
Tags |
cfx post, split a surface |
|
|
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 |