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

Boundary condition coding - problem in parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2011, 09:06
Default Boundary condition coding - problem in parallel
  #1
New Member
 
Pal Schmitt
Join Date: Aug 2010
Location: Belfast
Posts: 21
Rep Power: 16
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


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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Boundary condition on 3D Supersonic nozzle problem with atmosphere dokeun FLUENT 0 April 1, 2010 22:59
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Problem with ambit Lio FLUENT 4 July 6, 2004 09: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 21:26.