|
[Sponsors] |
July 2, 2013, 06:26 |
|
#41 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Hi Bernhard,
Thanks for your response. I am actually using the code calcMassFlow developed by Philippose, which is also mentioned earlier in this thread. I downloaded the file from http://www.cfd-online.com/Forums/ope...-boundary.html This code seems to be the same as the one you suggest: http://openfoamwiki.net/index.php/Contrib_calcMassFlow The thing is that I am very new to C++ and OpenFOAM and I don't know how to extract the information. I tried http://openfoamwiki.net/index.php/Co...e_calcMassFlow functions { patchMassFlow { type patchExpression; accumulations ( sum ); patches ( inlet outlet ); expression "phi"; verbose true; } } but it gives error for the patchExpression --> FOAM FATAL ERROR: Unknown function type patchExpression Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting What should I replace with the patchExpression? And my last question is that will this function written above give me a file with the mass fluxes for the desired patches? Or should I add some sprict to it? Thank you for your time |
|
July 2, 2013, 08:14 |
|
#42 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Hi again,
I am now trying to compile the swak4Foam given here http://openfoamwiki.net/index.php/Contrib/swak4Foam but I cannot execute it by typing wmake all!! It gives the following error: -bash-4.1$ wmake all /appl/OpenFOAM/OpenFOAM-2.0.1/wmake/wmake: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory What do I do wrong? |
|
July 2, 2013, 11:38 |
|
#43 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
You can try replacing in the first line of Allwmake /bin/bash witg /bin/sh but in the past this introduced other problems. So the best fix (IMHO) is to install bash on that machine (I'm sure there is a package for compatibility)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
July 5, 2013, 14:01 |
|
#44 | |
New Member
Cay Myers
Join Date: Jun 2013
Posts: 14
Rep Power: 13 |
Quote:
If you want to write the output given by calcMassFlow to a text file, you can us the command calcMassFlow | tee log. Your output will then appear in the log file located in the case directory. This same command can be used for other solvers and utilities if you just replace calcMassFlow with the name of whichever solver you want information from. |
||
July 6, 2013, 07:21 |
|
#45 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
Thanks a lot for your response. As you said there is no bash installed on the distro. I actually don't know what kind of distro it is. I use linux through my university network, so I have no idea about their distro. I will contact them to hear more about it. |
||
July 6, 2013, 07:28 |
|
#46 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
|
||
July 6, 2013, 19:13 |
|
#47 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
Hi, I have used this utility to calculate the mass flow at the boundaries and it works very well. The only problem I'm facing is that I can't find a way to sort all the information generated by calcMassFlow at each time step. The goal is to plot the fluxes at each time step and monitor the variation as function of time. I tried matlab without any success. Is there any smart way to do this? Thanks a lot Hale |
||
July 23, 2013, 03:09 |
Thx
|
#48 |
New Member
Johannes Widmann
Join Date: May 2013
Location: University of Stuttgart
Posts: 1
Rep Power: 0 |
Hi guys,
I try to do it with OF 2.2 and it works well. Thanks a lot |
|
September 17, 2013, 04:00 |
how to get the flux for each cell?
|
#49 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
I'm interested in getting the flux at each cell of my boundaries (at each time step) and not the sum of the fluxes at each boundary, is there any solution for my problem? I know that the data for each cell is given in the phi file but since I'm running in parallel it is not possible to find the data for a specific boundary in the that file!
|
|
September 17, 2013, 06:03 |
|
#50 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
There are ways of getting that data out during the run but you've got to be more specific on how you want to postprocess that (usually I'd say "single values are only interesting during development because they characterize the discretization but have got nothing to do with the physical system")
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 17, 2013, 06:38 |
|
#51 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Thanks for your reply Bernhard.
I thought that the phi file only gives the flux of each cell without stating which boundary they belong to, but after I read your post I looked carefully and I found what I was looking for But now the problem is that I only need the values that are in the middle of the boundary. Is there any way to check where each mesh cell is located? |
|
October 9, 2013, 01:16 |
Mass flux using paraview
|
#52 |
Member
Dr. B T KANNAN
Join Date: Jul 2011
Location: CHENNAI (MADRAS), INDIA
Posts: 55
Rep Power: 15 |
Dear Foamers,
If you are simulating incompressible flows, in Paraview there is an FILTER called "SURFACE FLOW" Usage: Create slice and apply surface flow. Open Spread sheet view and find the value. (Note: This is only velocity integrated over area, so multiply by rho to get mass flux) - KANNAN |
|
March 17, 2014, 10:02 |
|
#53 |
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 13 |
Hi philippose,
Thank you for upload your attach.It works well.It is easy to get the mass flow rate at the knowed boundry,e.g,inlet,outlet.But if I want to get the mass flow rate on any patch not only the boundry,how can I do? For example,Can I give the command like "basePoint(0 0 0);normalVetor(0 0 1)"to define the patch what I want to calculate mass flow rate? Thanks in advance! |
|
October 18, 2016, 20:40 |
|
#54 |
New Member
Yi Han
Join Date: Oct 2013
Location: Laramie WY
Posts: 15
Rep Power: 13 |
Very useful utility, thank you very much!!
|
|
October 18, 2016, 20:42 |
|
#55 | |
New Member
Yi Han
Join Date: Oct 2013
Location: Laramie WY
Posts: 15
Rep Power: 13 |
Quote:
Hello zqlhzx, Have you make that work ? I also have same situation as yours. If you did, could you please tell me how to do it? Thanks, Yi Han |
||
April 24, 2017, 04:30 |
|
#56 |
Member
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 10 |
Hi everyone,
I want to calculate mixing efficiency through the formulae attached in a file. Can anyone help me how to do that ??? |
|
April 26, 2017, 07:46 |
|
#57 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
A formula is useless if you don't explain what the symbols mean. I think this can be done with swakfoam but I refuse to guess things like where "mass flow of H2" is defined
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
April 26, 2017, 08:50 |
|
#58 | |
Member
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 10 |
Quote:
Hi, mass flow of H2 is constant at fuel inlet. Mostly I want to know about the numerator part where I have to do integration. I have to integrate alpha*(density of mixture)*(mass fraction of h2)*(axial velocity) over a cross section in the combustor. I will do the same at many cross sections and plot efficiency graph along length of combustor. |
||
April 26, 2017, 20:21 |
|
#59 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
And what is the phi in the definition of alpha? Surly not the phi-field? Anyway: is doable in swak4foam
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 27, 2017, 02:46 |
|
#60 | |
Member
Mukesh Adlak
Join Date: Jun 2016
Posts: 32
Rep Power: 10 |
Quote:
Hi, Phi is local equivalence ratio. Yes, cross sections are aligned with cell faces. I dont have any other things. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculate Mass Flow in a faceSet during calculation | torvic | OpenFOAM Running, Solving & CFD | 1 | August 11, 2008 20:05 |
mass flow rate calculation | Ahmed | CFX | 7 | June 20, 2008 06:55 |
Calculation of mass flow rate | msrinath80 | OpenFOAM Running, Solving & CFD | 0 | April 18, 2007 15:05 |
Calculation of added mass in viscous flow | kharati | Main CFD Forum | 2 | February 1, 2006 01:28 |
Mass Flow Rate Calculation | Paul | FLUENT | 9 | March 23, 2002 09:37 |