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

Problem in generating too many pointsFoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproud gif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2008, 03:49
Default Hi OpenFOAM I add a code to
  #1
Senior Member
 
Marhamat Zeinali
Join Date: Mar 2009
Location: Tehran, Tehran, iran
Posts: 107
Rep Power: 17
marhamat is on a distinguished road
Hi OpenFOAM

I add a code to channelOodles Solver for generating arbitrary points in every iteration in the solution domain .
When the points number is below than 92,the code works OK.But when the points number is upper than 92(for ex:100 or 1000 points),after some iteration the run fails.

n=85 YYY[n]= 0.230973cellRandom1 9017
n=86 YYY[n]= 0.171737cellRandom1 140439
n=87 YYY[n]= 0.2166cellRandom1 51072
n=88 YYY[n]= 0.1761cellRandom1 32538
n=89 YYY[n]= 0.240889cellRandom1 75073
n=90 YYY[n]= 0.205857cellRandom1 50671
n=91 YYY[n]= 0.241429cellRandom1 14997
n=92 YYY[n]= 0.243897cellRandom1 135296
Foam::error::printStack(Foam:stream&)
Foam::sigSegv::sigSegvHandler(int)
[0xffffe420]
channelOodles [0x8060d6c]
__libc_start_main
__gxx_personality_v0
Foam::error::printStack(Foam:stream&)
Foam::sigSegv::sigSegvHandler(int)
[0xffffe420]
channelOodles [0x8060d15]
__libc_start_main
__gxx_personality_v0

>>You can see the part of the written code:

Random perturbation(1234567);


int loopRandX;
int loopRandZ;
for(int n=1;n<=bubbleNumber.value();n++)
{
Info<< "n="<< n ;
loopRandX =rand() % 10000 + 1;
Info<< " loopRandX= "<<loopRandX ;
XXX[n] = (loopRandX*deltaX)/10001 + xFirst.value();
Info<< " XXX[n]= "<< XXX[n] ;
YYY[n]= ((perturbation.GaussNormal()+1)/2)*deltaY +yFirst.value();
Info<< " YYY[n]= "<< YYY[n] ;
loopRandZ =rand() % 1000 + 5;
Info<< " loopRandZ= "<<loopRandZ ;
ZZZ[n] = (loopRandZ*deltaZ)/1005 + zFirst.value();
Info<< " ZZZ[n]= "<< ZZZ[n]<< endl ;

position[n] = XXX[n] * vector(1,0,0) + YYY[n] * vector(0,1,0) + ZZZ[n] * vector(0,0,1) ;
label cellRandom1 = mesh.findCell(position[n]);
cellRandom[cellRandom1] = mesh.C()[cellRandom1];
Info<< "cellRandom1 "<< cellRandom1 << endl;
}
Ideas are welcom.
With Best Regards
Marhamat
marhamat 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
FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp rengu OpenFOAM Running, Solving & CFD 5 March 3, 2009 10:19
Compiling liftDrag crashed with initc%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartsadgif%22 ALT%3d%22%22 BORDER%3d0%3etext0x20 undefined reference to %60mainb sponiar OpenFOAM Running, Solving & CFD 2 January 17, 2008 04:00
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp nishant_hull OpenFOAM Running, Solving & CFD 18 October 30, 2007 13:52
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp guimch OpenFOAM Running, Solving & CFD 6 October 25, 2007 17:52
Cannot find liberty %3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumcliparthappygif%22 ALT%3d%22%22 BORDER%3d0%3e panara OpenFOAM Installation 5 August 10, 2007 14:39


All times are GMT -4. The time now is 18:36.