CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

fieldAverage functionObject is not working : openFOAM v2312

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ravicfdd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2024, 08:27
Smile fieldAverage functionObject is not working : openFOAM v2312
  #1
New Member
 
Ravi
Join Date: Dec 2023
Posts: 6
Rep Power: 3
ravicfdd is on a distinguished road
I am using openFOAM v2312 and I am trying to do fieldAveraging of U p and T in my case file.

I have implemented the fieldAverage as per the openFOAM documentation but it is not working. After running the case I do not find any averaged files written.
I am a beginner in this software, so any help is appreciated. I am posting the controlDict file below, where I have implemented the fieldAverage

Also is there a way to do fieldAverage as a postProcess. I don't see fieldAverage as an option in postProcess -list.
Thanks.
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application rhoCentralFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.007;

deltaT 1e-07;

writeControl timeStep;

writeInterval 1000;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep no;

maxCo 0.2;

maxDeltaT 1;

fieldAverage1
{
type fieldAverage;
libs (fieldFunctionObjects);
writeControl writeTime;

fields
(
U
{
mean yes;
prime2Mean no;
base time;
}

p
{
mean yes;
prime2Mean no;
base time;
}

T
{
mean yes;
prime2Mean no;
base time;
}

);

}
ravicfdd is offline   Reply With Quote

Old   February 16, 2024, 04:56
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

Do you see info related to this function object in your terminal/log file when running the solver? (look for the solver start up and on write times)

Do you see files such as UMean, pMean, TMean in your time step directories?

Yann
Yann is offline   Reply With Quote

Old   February 16, 2024, 06:26
Default
  #3
New Member
 
Ravi
Join Date: Dec 2023
Posts: 6
Rep Power: 3
ravicfdd is on a distinguished road
Hello,

Thanks for the reply.

There is no information about the fieldAverage when I run it. Even at write times, it just shows the usual residual Ux, Uy etc. It does not display anything indicating as if averaging is happening. The time step directories have a folder called uniform. Uniform contains, functionObjects folder and a time file. The functionObjects folder has a functionObjectProperties file, which is just empty. I will post the functionObjectProperties file below.

The time file just indicates at which time it is getting written.

FoamFile
{
version 2.0;
format ascii;
arch "LSB;label=32;scalar=64";
class dictionary;
location "0.1/uniform/functionObjects";
object functionObjectProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



// ************************************************** *********************** //
ravicfdd is offline   Reply With Quote

Old   February 16, 2024, 06:55
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Alright, I misread your controlDict.

You are missing the functions{} section to encapsulate your function object definition:

Code:
functions
{
	fieldAverage1
	{
		type fieldAverage;
		libs (fieldFunctionObjects);
		writeControl writeTime;

		fields
		(
			U
			{
				mean yes;
				prime2Mean no;
				base time;
			}

			p
			{
				mean yes;
				prime2Mean no;
				base time;
			}

			T
			{
				mean yes;
				prime2Mean no;
				base time;
			}

		);

	}
}
Let me know if it solved the problem.

Yann
Yann is offline   Reply With Quote

Old   February 16, 2024, 07:05
Default
  #5
New Member
 
Ravi
Join Date: Dec 2023
Posts: 6
Rep Power: 3
ravicfdd is on a distinguished road
Hello,

Wonderful. That worked! Thank you very much for your support.
Yann likes this.
ravicfdd 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
scotch parallel run is not working in OpenFOAM 2012 chandra shekhar pant OpenFOAM Running, Solving & CFD 7 December 7, 2022 04:13
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
[OpenFOAM] Paraview not working in openfoam Milind Kshirsagar ParaView 1 May 9, 2019 04:52
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36


All times are GMT -4. The time now is 08:40.