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

Question: Clever way to calculate a varying MFR to make a plot

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By singer1812
  • 1 Post By singer1812

Reply
 
LinkBack Thread Tools Display Modes
Old   November 28, 2011, 02:13
Arrow Question: Clever way to calculate a varying MFR to make a plot
  #1
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
New to the forum and searched but didn't find what I was looking for.

I'm making a Head vs Volumetric Flow rate plot for a radial pump, but I don't want to manually run and solve CFX for a range of output values... there must be a smarter way to go about it.

The variable to change between runs is my outlet mass flow rate.

I have Ansys V13 and I am using Workbench...


Anyhelp is much appreciated.
Omerta is offline   Reply With Quote

Old   November 28, 2011, 02:53
Default
  #2
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
Could I make it a transient problem and vary the MFR? Would that work? I've only indulged in SS so far.

Edit: nope doesnt seem to
Omerta is offline   Reply With Quote

Old   November 28, 2011, 11:08
Default
  #3
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
The BC conditions can be a CEL function. For example, if you are running that in SS, use some like the following:

MF=1 [kg s^-1]*1[kg s^-1]*(step(citern-100.5)+step(citern-200.5)+step(citern-300.5))

This will set MF to 1 for 100 iterations, then add 1 (so a total of 2) for iteration 101-200, and then add 1 more (so total of 3) for the rest of the iterations that you are running for.

Just adjust the step fucntions mass flows and such to meet your needs. You can get pretty fancy with the BCs, just make sure you aren't making too drastic of a change or the run might diverge depending on your model.
Omerta likes this.
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 14:23
Default
  #4
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
How would I save the results for each set of iterations? Or could I make that plot within the solver itself using monitors? I feel like that would be inaccurate until it converges
Omerta is offline   Reply With Quote

Old   November 28, 2011, 14:27
Default
  #5
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
You can monitor the values you are interested in, plus you can setup a backup file at each of the increase points so that you will have a result file for each condition.

You have to make the judge as to when your SS run is converged. In cases that I run, I typically know about how many iterations it takes to reach SS values for the variables I am interested in and set the update to something somewhat larger than that.

If you use full backup files, you can restart a simulation for the case you want with the right backup and run it out a bit longer should it need more iterations.
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 14:31
Default
  #6
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
hmm, I'll give that a shot.


For a transient solution... is there anyway I could set the initial boundary condition to be 1 kg/s then have it increase to 20 kg/s over 10 seconds? Is it possible to do that in CFX?

Seems like it should be a capability?
Omerta is offline   Reply With Quote

Old   November 28, 2011, 14:34
Default
  #7
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
All of that is possible.

Look up the variable citern in the CFX help. You will find many other varibles that you can use that relate to SS and transient runs, restarted and fresh started.

CITERN is just the current run iteration. Total iterations can be access, time can be access, etc...
Omerta likes this.
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 15:25
Default
  #8
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
Looking into that.

Side note:

Under initialization, I cannot input initial values for anything transient for BC's? Am I looking in the wrong place?
Attached Images
File Type: jpg hmmmm.jpg (35.6 KB, 16 views)
Omerta is offline   Reply With Quote

Old   November 28, 2011, 15:28
Default
  #9
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
Double click it?
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 15:31
Default
  #10
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
Nothing specific to transient IC's here
Attached Images
File Type: jpg ummmmm.jpg (18.7 KB, 9 views)
Omerta is offline   Reply With Quote

Old   November 28, 2011, 15:32
Default
  #11
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
You have your simulation set to SS?
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 15:35
Default
  #12
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
No, its transient
Attached Images
File Type: jpg trans.jpg (17.0 KB, 6 views)
Omerta is offline   Reply With Quote

Old   November 28, 2011, 15:38
Default
  #13
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 494
Rep Power: 11
singer1812 is on a distinguished road
Ohh, I see it now. Change the Automatic to something else in those drop downs under the previous image you showed me.
singer1812 is offline   Reply With Quote

Old   November 28, 2011, 16:16
Default
  #14
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
oh, figured it would be more detailed than that.


I can run it fine in SS but when I shifted it to transient I'm getting these errors now.

----------------------------------------------------------------------
COEFFICIENT LOOP ITERATION = 7 CPU SECONDS = 1.334E+01
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| U-Mom | 9.24 | 1.5E-03 | 2.9E-02 | 1.1E-03 OK|
| V-Mom | 7.51 | 1.5E-03 | 4.1E-02 | 1.0E-03 OK|
| W-Mom |35.19 | 4.9E-03 | 8.2E-02 | 2.9E-04 OK|
| P-Mass |99.99 | 7.5E-05 | 1.8E-03 | 15.2 6.2E-02 OK|
+----------------------+------+---------+---------+------------------+
+--------------------------------------------------------------------+
| ****** Notice ****** |
| A wall has been placed at portion(s) of an INLET |
| boundary condition (at 57.1% of the faces, 78.8% of the area) |
| to prevent fluid from flowing out of the domain. |
| The boundary condition name is: R1 Inlet. |
| The fluid name is: Water. |
| If this situation persists, consider switching |
| to an Opening type boundary condition instead. |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| ****** Notice ****** |
| A wall has been placed at portion(s) of an OUTLET |
| boundary condition (at 59.8% of the faces, 30.9% of the area) |
| to prevent fluid from flowing into the domain. |
| The boundary condition name is: R1 Outlet. |
| The fluid name is: Water. |
| If this situation persists, consider switching |
| to an Opening type boundary condition instead. |
+--------------------------------------------------------------------+
| K-TurbKE |43.25 | 6.0E-01 | 2.3E+00 | 6.4 2.6E-08 OK|
| E-Diss.K |50.77 | 5.5E-01 | 2.4E+00 |100.8 2.6E-08 OK|
+----------------------+------+---------+---------+------------------+
----------------------------------------------------------------------
COEFFICIENT LOOP ITERATION = 8 CPU SECONDS = 1.555E+01
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| U-Mom |10.21 | 1.6E-02 | 3.4E-01 | 1.6E-02 OK|
| V-Mom |10.99 | 1.7E-02 | 2.8E-01 | 2.6E-02 OK|
| W-Mom | 4.89 | 2.4E-02 | 4.9E-01 | 2.2E-02 OK|
| P-Mass |99.99 | 1.4E-02 | 6.0E-01 | 10.5 8.6E-02 OK|
+----------------------+------+---------+---------+------------------+
+--------------------------------------------------------------------+
| ****** Notice ****** |
| A wall has been placed at portion(s) of an INLET |
| boundary condition (at 57.1% of the faces, 78.8% of the area) |
| to prevent fluid from flowing out of the domain. |
| The boundary condition name is: R1 Inlet. |
| The fluid name is: Water. |
| If this situation persists, consider switching |
| to an Opening type boundary condition instead. |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| ****** Notice ****** |
| A wall has been placed at portion(s) of an OUTLET |
| boundary condition (at 58.7% of the faces, 27.7% of the area) |
| to prevent fluid from flowing into the domain. |
| The boundary condition name is: R1 Outlet. |
| The fluid name is: Water. |
| If this situation persists, consider switching |
| to an Opening type boundary condition instead. |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Floating point exception: Overflow |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Stopped in routine FPX: C_FPX_HANDLER |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| An error has occurred in cfx5solve: |
| |
| The ANSYS CFX solver exited with return code 1. No results file |
| has been created. |
+--------------------------------------------------------------------+
Omerta is offline   Reply With Quote

Old   November 28, 2011, 17:10
Default
  #15
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
Fixed it by boosting my initial MFR in my expression. I just did a simple step function.
Omerta is offline   Reply With Quote

Old   November 28, 2011, 18:29
Default
  #16
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
How do I access the other timesteps that are calculated? Its only showing my final in POST
Omerta is offline   Reply With Quote

Old   November 29, 2011, 07:22
Default
  #17
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
You have to include other time steps in the results file when you set the simulation up for them to be available.
ghorrocks is offline   Reply With Quote

Old   November 29, 2011, 13:40
Default
  #18
New Member
 
Kyle
Join Date: Nov 2011
Location: New Brunswick, Canada
Posts: 25
Rep Power: 5
Omerta is on a distinguished road
Got it, thanks.

I have 21 results now with varying MFR... Do I need to make a script or something to extract the head / MFR from each timestep to create a plot?

Giving sequence chart a try now...
Omerta is offline   Reply With Quote

Old   November 29, 2011, 17:20
Default
  #19
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,830
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
If you set them up as monitor points you would get the graphs as the run proceeds. If not then you need to extract them in post-processing and you will probably need a CFD-Post session file to do this.
ghorrocks is offline   Reply With Quote

Reply

Tags
h vs q, mfr, plot, pump, varying

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
very easy question: a routine to calculate L infinity norm HaKu Main CFD Forum 0 May 3, 2011 11:12
Quick Xfoil plot question ChrisDanger Main CFD Forum 2 January 27, 2011 10:21
a question about a plot in tecplot mhm Tecplot 1 October 4, 2010 16:15
basic question contour plot in paraview Kate OpenFOAM Paraview & paraFoam 6 March 14, 2010 17:10
Quick question about MFR Rob CFX 3 March 22, 2005 19:05


All times are GMT -4. The time now is 13:58.