# Re: Novice question about flair and geometry debugging

From: Santana, Mario <msantana_at_slac.stanford.edu>
Date: Sun, 28 Oct 2012 11:23:01 -0700

Hi Ray,

Indeed you are missing something obvious ;-)
CSG is boolean logics, so if you define a condition like 'A AND B', the negation to that
(=what is around that region) will be 'NOT(A AND B)' = 'NOT(A) OR NOT(B)'.
Translating that to your problem, your void surrounding the target has to be defined as:

VOID 5 | +void -tgtcyl | +void -tgtcone

Where '|' is the OR operator

Note also that you could have also used the parenthesis,

VOID 5 | +void -(+tgtcyl +tgtcone)

Mario

On Oct 27, 2012, at 5:13 PM, Ray F. Cowan wrote:

> My apologies in advance for asking such a simple question, but
> I have run into a problem combining an RCC body and a TRC body
> into a single region (my "target"). I am using FLAIR.
>
> My code is based on the simple example in the FLAIR manual. I keep the same
> blackbody and void regions. I create a new target region composed
> of a cylinder (RCC) and truncated cone (TRC).
>
> The problem shows up in two ways:
>
> 1) If I try to debug the geometry in the target vicinity, I get
> many points listed as belonging to no region (when, in fact, they
> do). Example:
>
>> **** Geometry debugging requested and activated ****
>> from X=3D-1.000000000E+01 to X=3D 1.000000000E+01 in step dX=3D 3.921568627E-01
>> from Y=3D-1.000000000E+01 to Y=3D 1.000000000E+01 in step dY=3D 3.921568627E-01
>> from Z=3D-5.000000000E+00 to Z=3D 2.100000000E+01 in step dZ=3D 5.098039216E-01
>>
>> **** Flkldb: Geometry error found ****
>> **** The point: -1.37254902 -6.8627451 0.0980392161 ****
>> **** is not contained in any region ****
>
> 2) If I try to plot the geometry in the target region, the plotting
> fails. Example:
>
>> Exit being called from FLKAG1, next region not found.
>> IR= 2 XB= 0.00000000E+00-0.69911756E+01-0.16999998E+02 WB= 0.00000000E+00
>> 0.00000000E+00 0.10000000E+01 DIST= 0.16999998E+02
>> IRLTGG= 0 SB= 0.00000000E+00-0.69911756E+01-0.16999998E+02 UB=
>> 0.00000000E+00 0.00000000E+00 0.10000000E+01
>
> My geometry input is:
>
>> GEOBEGIN COMBNAME
>> 0 0
>> * Black body
>> SPH blkbody 0.0 0.0 0.0 100000.0
>> * Void sphere
>> SPH void 0.0 0.0 0.0 10000.0
>> * Cylindrical target
>> RCC tgtcyl 0.0 0.0 0.0 0.0 0.0 8.0 7.0
>> TRC tgtcone 0.0 0.0 8.0 0.0 0.0 11.691 7.0 0.25
>> END
>> * Black hole
>> BLKBODY 5 +blkbody -void
>> * Void around
>> VOID 5 +void -tgtcyl -tgtcone
>> * Target
>> TARGET 5 +tgtcyl +tgtcone
>> END
>> GEOEND
>
> I note that if I omit the cylinder and use only the cone, or if I omit the
> cone and use only the cylinder, both debugging and plotting succeed. Theplots
> show a side (Z-Y) view of the cylinder (looks like a rectangle of correct
> dimensions) or a side view of the cone (looks like a triangle of correct
> dimensions).
>
> The problem occurs when I try to combine the cylinder and the cone into
> a single target region.
>
> Any suggestions would be appreciated! I think it is very, very likely Iam
> missing something obvious.
>
> Thank you,
> --Ray
>
Received on Sun Oct 28 2012 - 21:46:28 CET

This archive was generated by hypermail 2.2.0 : Sun Oct 28 2012 - 21:46:29 CET