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

loss of dimensions during integration...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2010, 09:36
Default loss of dimensions during integration...
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi!

I have a little problem during an integration. I have 2 volScalarField (T and phase_gamma) and a dimensionedScalar (V_gamma).

the dimensions are the following :

T [-1 3 1 0 0 0 0]
phase_gamma [0 0 0 0 0 0 0]
V_gamma [0 3 0 0 0 0 0]

during my process, I need to reassign T according to :

T = phase_gamma*INTEGRAL(phase_gamma*T,V_gamma)/V_gamma

I use the following code:
T=phase_gamma*sum(fvc::volumeIntegrale(phase_gamma *T))/V_gamma

The compilations is ok. However I obtain an error during the execution of the code ("different dimensions"). It looks as if the operation "sum(fvc::volumeIntegrale(phase_gamma*T))" do not account for the dimension.

Do you have any idea ?
Thank you for your help,
Cyprien
Cyp is offline   Reply With Quote

Old   June 23, 2010, 10:33
Default
  #2
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 18
herbert is on a distinguished road
Hi Cyprien,

I think "sum" is not taking dimensions into account. Try fvc::domainIntegrate("field") instead of sum(fvc::volumeIntegrale("field")).

Regards,
Stefan
herbert is offline   Reply With Quote

Old   June 23, 2010, 12:50
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
It works !! thank you very much !
Cyp is offline   Reply With Quote

Old   July 7, 2010, 14:33
Default
  #4
New Member
 
Join Date: Jul 2010
Posts: 3
Rep Power: 16
ingrid is on a distinguished road
Hi,

I'm a beginner with openfoam and I need to integrate a pressure by a length (r_1). I've tried plenty of things but it doesn't work. I ended up with this :

scalar pression1= ((gamma1*gamma1)/(4*pi*pi))*fvc::r_1integrate((1-::exp(-(r_1*r_1)/(r_eq1*r_eq1)))*(1-::exp(-(r_1*r_1)/(r_eq1*r_eq1)))/(r_1*r_1*r_1));

could you please tell me what is wrong.

Otherwise I also wanted to write directly the integral but unfortunately I need to use the exponential integral (Ei)function and I don't know how to implement it in my program.
Don't you have any idea how to use it?

Thank you in advance,

Ingrid
ingrid 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
Mass loss! So what? jinwon park Main CFD Forum 13 May 22, 2008 10:29
How to deifmne head loss co effcint ? Angelina FLUENT 1 February 8, 2006 10:41
How to deifmne head loss co effcint in cfx? Angelina CFX 4 February 7, 2006 14:14
how to deal with "particle Exceeded integration" steven CFX 1 August 30, 2005 08:03
Any numerical triple integration program is available in Fortran? Radhakrishnan Main CFD Forum 3 March 4, 1999 02:03


All times are GMT -4. The time now is 23:53.