CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > FloEFD, FloWorks & FloTHERM

Averaging a velocity field (SW flow simulation)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2015, 12:02
Default Averaging a velocity field (SW flow simulation)
  #1
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
After running a transient analysis (SW flow simulation) and after reaching goal convergence, i end up with a list of files for each time step i chose to save the results. Lets supose i did 3000 iterations and i have the least 500 saved (the rest was deleted to save space). I now can load one of those 500 iterations and plot, for example, the velocity distribution on the mid plane for that time period. I can do this for any of the 500 iter. Is there a way for me to calculate the average velocity distribution of those 500 iter.? Or to get the velocity information of each cell (on the plane in study) for each iter. to an excel file (i could then calculate the average for each cell and try to plot it)? I have a PIV plane to compare it to, but PIV is an average meajurement. I cant compare the PIV to the plane of one iteration, i would like to average them.
If there is a way to do this outside of SW, i'm fine with that too .

thanks

Last edited by joaopffg; March 14, 2015 at 15:04.
joaopffg is offline   Reply With Quote

Old   March 14, 2015, 16:42
Default
  #2
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
I'm going to reply to myself :P.
I ended up doing the folowing:
1) ran the study
2) created a part with one face in the same plane as the PIV (done in the lab)
3) used the "Point Parameters" on the surface
4) created a patter with those points (i would show the image, but i dont know how...)
5) extracted the Vx, Vy, and coordinates of those points to an excel file (for each saved time step)
6) data treatment using matlab

if anyone knows an easier way to do this, fire away
joaopffg is offline   Reply With Quote

Old   March 16, 2015, 08:38
Default
  #3
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
Unfortunately there is no option in SWFS to export the results to ParaView but in FloEFD. One of the differences that come between SWFS and the version from Mentor Graphics directly.
But you could try point parameters and select a plane where the cut plot is located and then set a number of points or spacing, the parameter you want to evaluate and you should also be able to select the transient time steps instead of loading each single one separately.
But be aware of the limitations in Excel regarding of number of rows and columns.

But the later part you already found out :-)

Boris
Boris_M is offline   Reply With Quote

Old   March 16, 2015, 14:49
Default
  #4
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
Hi Boris,
i think i figured out how to post images here :P.
One of them is the grid i did on solidworks. After that i exported the velocity info on those points as an excel file and used matlab to create the piv like plane. I ended up with the other image.

malha.jpg

matlab_piv.jpg
joaopffg is offline   Reply With Quote

Old   March 16, 2015, 19:32
Default
  #5
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
This is just to show the last result.
I did the velocity average (Vx and Vy) of all the saved time steps for all the points in matlab and saved the coordinates and velocity components of each point as an excel file. Then used Tecplot to make the graphs.

untitled.jpg
joaopffg is offline   Reply With Quote

Old   March 17, 2015, 04:00
Default
  #6
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
Very nice, let us know how the results compare to the real PIV you did.
Boris_M is offline   Reply With Quote

Old   March 19, 2015, 17:56
Default
  #7
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
Hi there,
i've done the averaging and the PIV and treated the data. First i'll show the pictures of the velocity field in the y direction with the streamlines.

PIV done in the lab (left) SolidW. Flow (right)
PIV_alterado.jpg PIV_SW_coord_alteradas.jpg

Now, i wasn't expecting the velocities to be the same but i didn't think they would be this different, either. I'm using around 2.5M cells on the whole model.
And the most important thing to me is that the directions (x and y) of the velocities are far apart. Below are two pictures of the error in the velocity direction calculated using matlab (the error is 0% if the x component is 0 and the y>0; the error is 100% if the y component is 0 or y<0). They are just to get an idea of where and how intense is the deviation of the velocity from the y direction.

PIV done in the lab (left) SolidW. Flow (right)
PIV_alterado_erro.jpg PIV_SW_coord_alteradas_erro.jpg


I know it is not a simple anser but i would like to now why the diference is so big. I know the code as some limits and the mesh isnt all that refined, but still...

thanks
joaopffg is offline   Reply With Quote

Old   March 20, 2015, 03:15
Default
  #8
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
Hi,
indeed that's a quite big difference.
Let's start with the questions you need to ask yourself:

- What did I do different between experiement setup and simulation setup?
Any boundary condition different, different geometry, did I consider the filter material in the model correctly, am I running the fan at the same RPM etc.

- Are the overall paramters such as pressure loss between inlet and outlet correct as well as the volume/mass flow rate?

Can you post a picture of the mesh?

Boris
Boris_M is offline   Reply With Quote

Old   March 21, 2015, 06:20
Default
  #9
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
Hi Boris,
you have quite an eye for this things.
The one major difference was the rpm. I measured the rotor's velocity with a stroboscopic light. But for that i took the motor apart, wich was a big mistake. Without the casing, the motor was able to spin a lot faster. I measured it again with the motor casing and all that inside the exhaust (just like in real use) and the rpm droped from 1600 to around 1350.
The geometry is as accurate as possible and the the boundary condithions are the same. I am using wall functions (so i dont have to refine the mesh so much neer the wall).
I did not consider the filter in the simulation. I dont think it will affect the results that much, other then increasing the overall pressure drop. However, since i do not have a way to measure that pressure drop in the lab, i am following this tutorial to simulate the porous media.
https://www.youtube.com/watch?v=fC0gQ0cEacA

As for the mesh, i'm using around 2.4M cells.
mesh1.jpg

mesh2.jpg

mesh3.jpg

One other thing, and i say this just to help anyone with the same problem.
At first, to change from the 1600 rpm to 1350rpm, i started a new project with those changes. A problem of convergence appeared. Since SW solves non linear equations (NS equations), the closer we are to the correct solution at the start of the calculations, the better for convergence. So what i did was run the problem for the 1600 rpm and wait fot it to converge. Then started to reduce the rpm to the correct rotation. Worked like a charm. I am now waiting fot it to finish the calculations and see how the flow turns out.
conv.png
joaopffg is offline   Reply With Quote

Old   March 23, 2015, 09:49
Default
  #10
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
Hi,

no problem. Working for 8 years with SWFS/FloEFD with customers you notice that often there are more assumptions done and are often not are really correct. Yes such a free fan can have a significant different RPM than a boxed fan. If the fan doesn't have a controlled RPM then you cannot assume it drives with the RPM that is on the datasheet or so. The resistance you get from pressure in the reality is acting as a reduction on the fan in RPM.
If you considered the filter as a porous media than this is what I wanted to point out. This should get you better results than assuming there is no porous media because you cannot find any values for the pressure drop vs. flow rate.
If you consider roughly (neglecting the shaft friction etc.) the shaft power and the power you put into the fan then you can see if that is about the same or if the RPM is too hight and will require more power to spin at that rate.
You can compare two calculations with and without the porous media to see the difference.

Let me know if your current calculation worked out.

Boris
Boris_M is offline   Reply With Quote

Old   May 14, 2015, 18:12
Default
  #11
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
Hi,

it's been a while since the last post here. So, i was able to simulate the kitchen exhaust with some precision. Then some questions appeared. First i'll explain what i did different from the first try, and then the questions :P.

The major difference was the fact that i was NOT USING SLIDING MESH. I had to install SW 2015 (i had 2014) to use this feature. If you have flow entering the rotating region perpendicular to the rotation axis, sliding mesh must be used. I also adjusted the mesh (ended up with around 4,5M cells), the geometry of the casing and the rotor as well. Lastly, i added the filter. I tryed two different ways to do this.
1st) simulated a porous media (as explained by GoEngineer). This was great to calculate the correct pressure drop, but ended up consuming calculation time.
2nd) used the perforated plate option. The pressure drop wasn't so accurate this way, but didn't affect much the comp. time.

piv.png piv_comp_ang.pngpiv_lab_ang.png

1st pic is the velocity vectors in the exit zone explained in the beginning of the post, 2nd shows the angle of the comp. flow (90º for vertical) and the 3rd shows the angle measured in the lab (PIV). As we can see the flow is pretty similar. There was some differences in the velocity values. In the lab, Vy max is 10 to 11m/s, and in the cfd i got around 12 to 13m/s. I think this is because the perforated plate isn't calculating the correct pressure drop (it's giving a value lower then the real one, thus higher velocities).

Before the questions. I am now simulating just the rotor and casing part in order to fing a better geometry to optimise the system.

questions:

1)Since we are using wall functions, should i be worried about the refinement of the partial cells in order to attain a certain y+ (y+>30 or 50)?

2)Is the computational time dependent on the number of goals chosen?

3)I know k-epsilon doesn't work on separated flows, so if i pump up the beta2 angle of the blades so that separation starts occurring, will i be able to somehow still use SW flow sim.? (like by adding more cells in the separated zone).

4)In the SW documentation we have an example of a radial pump where they calculate the efficiency of the blades. Can i do the same to a sirocco tipe fan? Using the same formula?

5)This one is about the mesh. When it is beeing generated, sometimes i get a worning saying that there are some irregular cells (i didn'g get this in SW 2014). Whats this about?

I'm sorry for the ''list'' of questions, but cfd is no joke... There is so much to have in mind..
The point of my work is to see if, by changing the geometry of the rotor and the casing, the overall efficiency can get better.

P.S.: The images are from matlab. They aren't as pretty as the first ones but Tecplot was acting weird for some reason...

Ty guys

Last edited by joaopffg; May 22, 2015 at 07:50.
joaopffg is offline   Reply With Quote

Old   July 13, 2015, 11:15
Default
  #12
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
Hi Joa,

sorry for the late reply but to get some answers to your long sougt questions :-)

1) No, don't worry about y+ so much. You can use partial cell refinement to resolve some of the curvature but with so many blades the mesh you showed in one of your images before looked pretty good already. There is no difference in the mesh or setup from the rotating region definition for the slinding mesh compared to the rotating reference frame or averaging plane approach.

2) in the sliding mesh approach you usually don't look at the goals so much as to get them converged and here they don't influence the calculation therefore as you calculate it in transient. In a steady state of course, the goals that are used for convergence must all converge so yes, the more goals you have the longer it can take for them to converge as all have to converge.

Yes, it works with separated flow too. Not as perfect maybe but it is not the standard k-e model. The developers are quite smart and improved that bit of the model to also cope with the separation better. Considering an airfoil and going to stall you will see a deviation for sure but not as bad as you know from standard k-e.

4) To be honest I don't know if that is the same equation or a different one. I'm not an expert in the different type of fans but I would guess it is.

5) Irregular cells should not concern you anymore. You can look it up in the Help of the FloEFD Menu.

Boris
Boris_M is offline   Reply With Quote

Old   July 13, 2015, 17:27
Default
  #13
New Member
 
Join Date: Feb 2015
Posts: 21
Rep Power: 11
joaopffg is on a distinguished road
Hi Boris,
thanks a lot for the replies.
In the time past i got the ansers to some of the questions. As for the formula for the efficiency, it is the same. It's power out over power in.
I also checked some other things like the Courant number and the timestep used in the iterations.
Just for curiosity, when i finish this work, i'll post here the results from the lab and SW.

Thanks again, Boris. You're a lifesaver.
joaopffg is offline   Reply With Quote

Old   July 14, 2015, 07:10
Default
  #14
Disabled
 
Join Date: Jul 2009
Posts: 616
Rep Power: 24
Boris_M will become famous soon enough
No problem, great results by the way with the average plots. Wait to see what will be in V15 or in your case probably SW 2016 ;-)
Boris_M is offline   Reply With Quote

Old   August 25, 2017, 04:23
Default
  #15
New Member
 
abo muhab
Join Date: Jan 2015
Posts: 11
Rep Power: 11
e.m.sabry is on a distinguished road
Quote:
Originally Posted by joaopffg View Post
This is just to show the last result.
I did the velocity average (Vx and Vy) of all the saved time steps for all the points in matlab and saved the coordinates and velocity components of each point as an excel file. Then used Tecplot to make the graphs.

Attachment 37881
could u please give the steps for that,,, i want to make a vector map from 10 time steps with velocity average values ......thanks a lot
e.m.sabry is offline   Reply With Quote

Reply


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
problem in simulation of velocity field using mixture model Edison Yan Fluent Multiphase 0 November 19, 2014 21:47
Convergence of jet flow simulation MiraLisa FLUENT 0 August 15, 2013 05:44
How to get the velocity of a specific position in flow field peaker007 Fluent UDF and Scheme Programming 1 June 6, 2011 08:15
velocity of massless particles and velocity of flow field in same coordinate payam_IUST FLUENT 0 October 19, 2009 00:24
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 13:19


All times are GMT -4. The time now is 00:49.