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

globalContErr

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2012, 13:20
Default globalContErr
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Hi,

I have a question to following lines in src/finiteVolume/cfdTools/incompressible/continuityErrs.H
Code:
volScalarField contErr = fvc::div(phi);
scalar globalContErr = runTime.deltaT().value()*
        contErr.weightedAverage(mesh.V()).value();
globalContErr should be an integral of the error over the complete domain volume and time step. fvc::div(phi) is a volume integral for each cell. Thus, time integration and summation over all cells is needed to obtain the global error. We already have the time integration *runTime.deltaT(), but why do we have averaging instead of summation over all cells?

Best regards,
Ilya

Last edited by linch; February 2, 2012 at 04:13.
linch is offline   Reply With Quote

Old   February 8, 2012, 07:07
Default
  #2
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
No ideas?
linch is offline   Reply With Quote

Old   February 9, 2012, 09:06
Default
  #3
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
I don't have any answers for you, except to add my own observation that the localContErr would, I think, be equivalent to the L1-norm of the pressure equation residual were it not for the volume-averaging.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   July 28, 2012, 08:07
Default
  #4
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by linch View Post
Hi,

I have a question to following lines in src/finiteVolume/cfdTools/incompressible/continuityErrs.H
Code:
volScalarField contErr = fvc::div(phi);
scalar globalContErr = runTime.deltaT().value()*
        contErr.weightedAverage(mesh.V()).value();
globalContErr should be an integral of the error over the complete domain volume and time step. fvc::div(phi) is a volume integral for each cell. Thus, time integration and summation over all cells is needed to obtain the global error. We already have the time integration *runTime.deltaT(), but why do we have averaging instead of summation over all cells?

Best regards,
Ilya
Dear Linch

I have a small question which is not related to the topic.
I need to calclute a volscalerfield which is the time integral of another volscaler filed during my calculation. (e.g. sigma=int(PhiWE,t) )

I am new in OpenFoam. Should I do sth like this:

sigma=(PhiWE-sigma)*runTime.deltaT()


I will appreciate if you help me.


Best
Mahdi
mm.abdollahzadeh 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



All times are GMT -4. The time now is 22:28.