|
[Sponsors] |
CFX Post Velocity in Tubes in Shell-and-Tube-Heat-Exchanger |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 19, 2019, 08:15 |
CFX Post Velocity in Tubes in Shell-and-Tube-Heat-Exchanger
|
#1 |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Hey guys,
I am trying to figure out the (areaAveraged) average tube velocity in a shell and tube heat exchanger in each tube. As you can see in the attachments I have a contour plot showing the velocities graphically, but I want these as a number for each tube. How can I achieve this? In ANSYS Meshing each whole tube is a named selection. So somehow splitting the contour plot into each plane would be an option. Or finding the intersecton between the 50mm plane from the picture below and the tube. Problem is, I don't know how to do this Can anyone tell me how to find the intersection between two locations? Does anyone have an idea how to get the average velocity in each tube considering these aren't sepeate bodies (the tube bundle is 1 body with a named selection for each tube volume). |
|
March 19, 2019, 08:52 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,869
Rep Power: 33 |
Very likely the meshing software created a set of faces for each independent tube.
In CFD-Post, open the "Mesh Regions" folder and see if you can identify a tube by name. If you can identify them, try to compute the calculation using such names. |
|
March 19, 2019, 09:02 |
|
#3 |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
You are right, I could use these but whenever I change the mesh those names change as well and I need to throw my postprocessing away.
Are there any suggestens for a more systematical approach? |
|
March 19, 2019, 11:38 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,869
Rep Power: 33 |
Are the named selections in the meshing software listed under "Mesh Regions"?
Those should not change under mesh changes, correct? they should only change under geometric model changes, i.e. more tubes/less tubes |
|
March 19, 2019, 17:50 |
|
#5 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
I would
1) define plane by a point and a normal. Set the point in the center of the tube that you want to investigate. Set the normal to 0 0 1 2) limit the plane using a circle. Make sure it is just a little larger than the diameter of the tube. 3) go to the calculator and use this plane to determine the areaAve(Velocity) You can increase the limit to capture multiple tubes. You can also use a rectangular limit to take a row of tubes. Good luck, GertJan |
|
March 20, 2019, 04:24 |
|
#6 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
Well I have my named selection "tubeID" in the named selections, as you can see below. But this is the whole tube, I can use volumeAve(Velocity)@tube1 for example to get the average velocity over the whole tube. What I want is the average velocity at a plane (e.g. 50 mm downstream of tube inlet) for ALL 1200 tubes. I basically want to be able to this: areaAve(Velocity)@Plane50mmTube1 areaAve(Velocity)@Plane50mmTube2 areaAve(Velocity)@Plane50mmTube3 etc. I don't have this plane Plane50mmTube1 yet. Doing these manually is not an option because of scale and I want to be able to use the same postprocessing for different exchangers without producing 1200 planes manually every time. I need some kind of script / semi-automatic method. |
||
March 20, 2019, 04:26 |
|
#7 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
I did this for a single plane manually but for 1200 tubes this is by far too much effort. And when I am switching to a different heat exchanger I would need to do it all over again. There has to be a smarter way |
||
March 20, 2019, 04:45 |
|
#8 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
I don't get it.
Is each tube a unique volume? And you want the average velocity in each volume? Or (given your expression: areaAve(Velocity)@Plane50mmTube1) do you want to know the velocity in each tube where it intersects Plane 50 mm? And, aren't the answers (more or less) the same? |
|
March 20, 2019, 05:15 |
|
#9 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
If your tubes are separate volumes, then you could set up a table. In cell 1, you set the expression volumeAve(Velocity)@tube0001
Then go to the table in the report in the tree on the left hand side, use your RMB, and select Edit in Command Editor. You will find the code for the table as text. Import the command for the contents of your first cell in to Excel. Then copy and modify this 1200 times, or as many tube as you have. I assume you are smart enough to do this ;-) Then: - paste the text from Excel in the Command editor of the table. - save the state file to something like state.cst - Close Post (I would not recommend to open the table. Not sure if it can hadle 1200 cells) - Open a command editor through the CFX-launcher - type cfx5post -report -res filename -t state.cst It will create a table in html format with all your numbers. Uncertainties: - I don't know it there is a limit for the number of rows of the table in Post. So I would first try it with a limited number of rows. - Alternatively, put the numbers in the other columns. - I don't know how long it will take for Post to calculate all 1200 tubes. Again, do a test with smaller numbers. |
|
March 20, 2019, 05:24 |
|
#10 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
I want both. But for the volume I already have the answer. But for a variety of reasons I would prefer to use method 2 And yes, the answers are more or less the same. For the tube I showed you above I have volumeAverage of 0.64 m/s (method 1) and for the areaAve at 50mm 0.663 m/s (method 2). Method 1 is just a workaround to roughly get the same numbers. Method 2 is sth. I am generally interested in for other problems where the difference is bigger as well as this one here. |
||
March 20, 2019, 05:30 |
|
#11 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
For method 1 I am using Power Syntax and CFX-5Post in Batchmode, somewhat similar to what you described but without using tables. Code:
COMMAND FILE: CFX Post Version = 19.0 END LIBRARY: CEL: EXPRESSIONS: Tubevelocity1 = volumeAve(Velocity)@Tube1 Tubevelocity2 = volumeAve(Velocity)@Tube2 Tubevelocity3 = volumeAve(Velocity)@Tube3 END END END !#Evaluate to Perl for variable output to file !my $filename = 'D:\User\Tim\03_Postprocessing\20190311_Reference\Output.txt'; !open(FH, '>', $filename) or die $!; !for ($i = 1; $i < 300; $i += 1) { !#print FH "test\n"; ! $tubeVelo = volumeAve("Velocity", "Tube$i"); ! print FH "$i;$tubeVelo\n"; !} !close(FH); 300 tubes to date are just a test to limit the model |
||
March 20, 2019, 06:11 |
|
#12 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
You can code something similar for a plane inside the tube with a circular limit. Just reposition the plane in a loop. What you need as input are the xy coordinates of each tube.
|
|
March 20, 2019, 08:06 |
|
#13 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
Okay, the problem is I need to figure the center (x,y) coordinate of each tube out by hand in my CAD model, which als sucks My colleagues working with other programs have 0 problems doing this, so I hoped that CFX-Post can do this as well without programming as much as I am already doing |
||
March 20, 2019, 08:22 |
|
#14 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
Per row, the tubes have a constant mutual distance. So, that should not be too difficult to program in Power Syntax.....
|
|
March 20, 2019, 09:13 |
|
#15 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
Right, you already had me convinced in your last post. I will give it a try in Power Syntax and post the results. I just wanted to avoid programming overall if not necessary |
||
March 20, 2019, 17:31 |
|
#16 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144 |
If you don't like perl (I don't for instance ) you can just write it out longhand in a big CEL text file. And the big CEL text file can be generated by anything which writes text files, such as python, VB or anything.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
March 27, 2019, 07:20 |
|
#17 | |
New Member
Tim Dorau
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Quote:
The file I read in at the start contains the center x/y-coordinates and the number of tubes per row. Variable names and Comments in German I basically iterate through each row and move the measurement plane along and calculate my velocity on that plane. While doing that I write results to another file. Code:
COMMAND FILE: CFX Post Version = 19.0 END !my $OUTfilename = 'D:\Benutzer\Tubevelocities.txt'; !my $infilename = 'D:\Benutzer\0001_PostPlanes.txt'; # Abstand der Tubes zueinander in einer Reihe !$tubeAbstand = 0.0449; ## Inputfile und OUTputfile oeffnen !open(OUT, '>', $OUTfilename) or die $!; !open my $in, "<:encoding(utf8)", $infilename or die "$infilename: $!"; #Inputfile Zeile für Zeile lesen ! $aktuelleReihe = 1; # Bei welcher Reihe ist die Iteration aktuell? !while (my $line = <$in>) { !chomp $line; # Einzelne Zeile betrachten !my @fields = split /;/, $line; # String am ; spalten und in Arry speichern !my $planeX = $fields[0]; # x-Koordinate des Rohrs am Rand !my $planeY = $fields[1]; # y-Koordinate des Rohrs am Rand !my $tubesPerRow = $fields[2]; # Anzahl der Tubes pro Reihe !my $planeZ = 6.928; # z-Koordinate: Haendisch festgelegter Ort der Ebene !for ($i = 1; $i < $tubesPerRow + 1; $i += 1) { PLANE:RohrEbene Apply Instancing Transform = On Apply Texture = Off Blend Texture = On Bound Radius = 10 [mm] Colour = 0.75, 0.75, 0.75 Colour Map = Default Colour Map Colour Mode = Constant Colour Scale = Linear Colour Variable = Pressure Colour Variable Boundary Values = Hybrid Culling Mode = No Culling Direction 1 Bound = 1.0 [m] Direction 1 Orientation = 0 [degree] Direction 1 Points = 20 Direction 2 Bound = 1.0 [m] Direction 2 Points = 30 Domain List = /DOMAIN GROUP:All Domains Draw Faces = Off Draw Lines = Off Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform Invert Plane Bound = Off Lighting = On Line Colour = 0, 0, 0 Line Colour Mode = Default Line Width = 1 Max = 0.0 [Pa] Min = 0.0 [Pa] Normal = 0 , 0 , 1 Option = Point and Normal Plane Bound = Circular Plane Type = Sample Point = $planeX [m], $planeY [m], $planeZ [m] Point 1 = 0 [m], 0 [m], 0 [m] Point 2 = 1 [m], 0 [m], 0 [m] Point 3 = 0 [m], 1 [m], 0 [m] Range = Global END !$planeX = $planeX - $tubeAbstand; !$tubeVelo = massFlowAve("Velocity", "RohrEbene"); !print OUT "$aktuelleReihe;$i;$tubeVelo;$planeX;$planeY\n"; !} !$aktuelleReihe = $aktuelleReihe + 1; # Die Reihe um eins Hochsetzen !} !close $in; !close(OUT); Thanks. This solution is really important |
||
March 27, 2019, 07:32 |
|
#18 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,910
Rep Power: 28 |
Vielen Dank für das Teilen dieses Codes
|
|
Tags |
cfxpost, heatexchanger, postprocessing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shell & Tube Heat Exchanger Ansys CfX (FYP) | eyeNa07 | CFD Freelancers | 2 | May 28, 2016 07:18 |
How to carry out 3D shell and Tube Heat Exchanger analysis in fluent | medogalal | FLUENT | 3 | December 30, 2015 05:28 |
Error in CFX Solution for Shell and Tube Heat Exchanger | Shomaz ul Haq | CFX | 3 | October 13, 2015 11:49 |
shell and tube heat exchanger... | ganesh chakravarthi | CFX | 3 | July 6, 2015 19:44 |
Analysis of shell and tube heat exchanger in Ansys | Dena | FLUENT | 0 | June 12, 2015 14:39 |