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

Boundary condition coding - problem in parallel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 4, 2011, 08:06
Default Boundary condition coding - problem in parallel
  #1
New Member
 
Pal Schmitt
Join Date: Aug 2010
Location: Belfast
Posts: 20
Rep Power: 8
wavemaster is on a distinguished road
Dear Forum,
I coded a boundary condition using
Code:
scalar Area         = sum(patch().magSf());
to get he patch surface area.
Everything seems fine but in parallel runs the code segfaults on the threads that run on the mesh part that does not contain the patch in the following piece of code:
Code:
        if ( fabs(directions_*celerity_*xi*dimension[1]) > SMALL )
        {
            sourcevel = (directions_*celerity_*xi*dimension[1])/Area;
        }

Using the following
Code:
        if ( fabs(directions_*celerity_*xi*dimension[1]) > SMALL && fabs(Area) > SMALL )
        {
            sourcevel = (directions_*celerity_*xi*dimension[1])/Area;
        }
solves the problem but seems a bit clumsy.
Is there a better way of doing this? Why is a patch evaluated if it is not in the part of the decomposed domain?
Thanks for comments,
Have a great day,
Pal
wavemaster is offline   Reply With Quote

Reply

Tags
coding bc parallel issues

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 45 February 8, 2016 05:42
Boundary condition on 3D Supersonic nozzle problem with atmosphere dokeun FLUENT 0 April 1, 2010 21:59
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Problem with ambit Lio FLUENT 4 July 6, 2004 08:23
a problem with Boundary condition M Rad Main CFD Forum 12 November 27, 1998 13:49


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