|
[Sponsors] |
November 22, 2014, 10:01 |
domainIntegrate() vs Sum(...)
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hello all together,
just one question. If I have the following code: Code:
Info << fvc::domainIntegrate(rho); Code:
forAll(rho, cellI) { mass_ += rho[cellI]*mesh.V()[cellI]; } Info << mass_; Code:
111 template<class Type> 112 dimensioned<Type> domainIntegrate 113 ( 114 const DimensionedField<Type, volMesh>& df 115 ) 116 { 117 return dimensioned<Type> 118 ( 119 "domainIntegrate(" + df.name() + ')', 120 dimVol*df.dimensions(), 121 gSum(fvc::volumeIntegrate(df)) 122 ); 123 } Tobi
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; November 22, 2014 at 11:17. |
|
November 22, 2014, 12:09 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
First idea: gSum supports multi-processor runs. Did you test with a single process?
|
|
November 23, 2014, 13:17 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Tobi: This is one of those situations I feel like complaining that I don't have a crystal ball. My guess is that:
Bruno
__________________
|
|
November 23, 2014, 14:30 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi Bruno,
I set the mass_ to zero and I build a new model for shrinkage the mesh due to density changes in casting. I made an error but the calculation what I did is correct! So its solved ... there is no error ! My fault - to tierd all the time and therefor I go to bed now.
__________________
Keep foaming, Tobias Holzmann |
|
October 18, 2016, 11:41 |
|
#6 | |
New Member
DANG
Join Date: Apr 2016
Location: Lyon 1, France
Posts: 26
Rep Power: 10 |
Quote:
Hi Tobi, I have encountered exactly the same problem as this post, Could you please disclose what kind of errors did you make leading the difference between the two approaches? Many thanks! Best regards, Dang. |
||
October 18, 2016, 11:49 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi Dang,
I am sorry that i did not post the solution to my problem here and based on the fact that it is already 2 years old, I can no remember how I solved it or what I did wrong. Maybe I can check out the old stuff and figure out what I did.
__________________
Keep foaming, Tobias Holzmann |
|
October 18, 2016, 11:54 |
|
#8 | |
New Member
DANG
Join Date: Apr 2016
Location: Lyon 1, France
Posts: 26
Rep Power: 10 |
Quote:
Hi Tobi, I really appreciate if you could check a little bit (if possible), I exhausted on this issue. .. Thanks for your time! Best regards, |
||
October 18, 2016, 13:55 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Dear Dang,
I checked my code and the latest developments. Based on the fact that the first shrinkage model (2014) was not really physical, I switched the development line after some discussions with my colleague and there is no code anymore that includes this lines. However, I found some issues in my bitbucket history that are about that problem. Do you have access to that one: https://bitbucket.org/opencast/tscst...-conservation?
__________________
Keep foaming, Tobias Holzmann |
|
October 19, 2016, 04:51 |
|
#10 | |
New Member
DANG
Join Date: Apr 2016
Location: Lyon 1, France
Posts: 26
Rep Power: 10 |
Quote:
Dear Tobi, Thanks a lot for your kind help and time. I tried to access the link, but denied. Is it possible to work around? Thanks! Best regards, |
||
October 19, 2016, 05:45 |
|
#11 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Dear Dang,
the problem was not really critical in my case because it was only around 0.3%. See the bitbucket stuff (I added the pictures) because the project is closed (I forgot).
__________________
Keep foaming, Tobias Holzmann |
|
October 19, 2016, 09:37 |
|
#12 |
New Member
DANG
Join Date: Apr 2016
Location: Lyon 1, France
Posts: 26
Rep Power: 10 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 15:33 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 04:03 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 02:58 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |