CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Mass flow average at arbitrary location

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By olesen
  • 1 Post By EZS
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2021, 04:56
Question Mass flow average at arbitrary location
  #1
EZS
New Member
 
Patrick Lüscher
Join Date: Feb 2018
Location: Switzerland
Posts: 4
Rep Power: 8
EZS is on a distinguished road
Hello everyone

I'm using OpenFOAM-6 with chtMultiRegionFoam to run transient simulations.
The case is basically a pipe with a specific inlet and outlet geometry. The simulation runs perfectly fine, but I need help with runtime post-processing the results.

I need to calculate the average temperature and pressure at multiple locations along the pipe. Therefore I used a function object in the controlDict to calculate the area average like this:
Code:
avgPlane
{
	type			surfaceFieldValue;
	libs			("libfieldFunctionObjects.so");
	region			fluid;
	writeControl		runTime;
	writeInterval		0.005;
	writeFields		false;
	regionType		sampledSurface;
	name			"surf000";
	operation		areaAverage;
	sampledSurfaceDict
	{
		type		plane;
		planeType	pointAndNormal;
		pointAndNormalDict
		{
			basePoint	(0 0 0.5);
			normalVector	(0 0 1);
		}
	}
	fields			(T p Uz k);
}
This works as intended, but now I want to calculate the mass flow average. According to the documentation I can achieve this with the following changes:
Code:
	operation	weightedAverage;
	weightField	phi;
The weightedAverage is not compatible with the sampledSurface though. There are 3 different values for regionType to choose from:
  1. sampledSurface this doesn't work, because you "Cannot use weightField for a sampledSurface".
  2. faceZone. I created a faceZone using searchableSurfaceToFaceZone, but OpenFOAM is "Unable to process internal faces for volume field T".
  3. patch. As far as I understand I cannot create a patch at any location, as this would influence the mesh, right?
I have looked through many threads in this forum and didn't find a solution to my problem. Here wyldckat suggests to use a baffle, but this would also influence my mesh.
Can anyone help me to calculate a mass flow average at an arbitrary location?
EZS is offline   Reply With Quote

Old   December 9, 2021, 07:09
Question
  #2
EZS
New Member
 
Patrick Lüscher
Join Date: Feb 2018
Location: Switzerland
Posts: 4
Rep Power: 8
EZS is on a distinguished road
Can anyone help me here? I still have not found a solution.
EZS is offline   Reply With Quote

Old   December 13, 2021, 15:24
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by EZS View Post
Can anyone help me here? I still have not found a solution.
If you can move to a different version, the weightField with a sampled surface should work more recent versions, such as OpenFOAM-v2106 or the upcoming OpenFOAM-v2112. They also support multiple weight fields - for example (rho U) to have mass-weighted.

Direct weighting with a surface field (phi) will only work for a small subset of sampled surfaces - faceZone, patch - where it is possible to reliably map their values to a corresponding sample surface face.
EZS likes this.
olesen is offline   Reply With Quote

Old   December 14, 2021, 08:24
Thumbs up
  #4
EZS
New Member
 
Patrick Lüscher
Join Date: Feb 2018
Location: Switzerland
Posts: 4
Rep Power: 8
EZS is on a distinguished road
Thank you for your answer! I will check if I can move my project from OF6 to OFv2106.
olesen likes this.
EZS is offline   Reply With Quote

Old   December 14, 2021, 10:02
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by EZS View Post
Thank you for your answer! I will check if I can move my project from OF6 to OFv2106.
Probably about a week or so until the December release (OpenFOAM-v2112).
EZS likes this.
olesen is offline   Reply With Quote

Old   May 27, 2024, 22:00
Default
  #6
chc
New Member
 
Join Date: Nov 2023
Posts: 18
Rep Power: 3
chc is on a distinguished road
Were you able to create your zone to find the average mass flow using this method? If so do you mind sharing your process?
chc is offline   Reply With Quote

Old   May 28, 2024, 06:03
Default
  #7
EZS
New Member
 
Patrick Lüscher
Join Date: Feb 2018
Location: Switzerland
Posts: 4
Rep Power: 8
EZS is on a distinguished road
Unfortunately, I didn't have time to try it. I'm currently not working on any OpenFoam projects.
EZS is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, field object, mass flow average, of6, post-processing


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
Target Mass Flow Rate Nitin FLUENT 9 June 17, 2017 11:30
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48
Pressure Outlet Targeted Mass Flow Rate LuckyTran FLUENT 1 November 23, 2016 11:40
Duct CFM: Velocity (mass flow average) vs Mass flow * Density Witchking782 STAR-CCM+ 1 January 28, 2016 17:36
Difference between Mass Flow Average in CFX and Mass-Weighted Average in Fluent dasha ANSYS 0 December 21, 2012 05:41


All times are GMT -4. The time now is 12:01.