# Re: Novice question about flair and geometry debugging

From: Ray F. Cowan <rfc_at_slac.stanford.edu>
Date: Sun, 28 Oct 2012 14:35:31 -0700 (PDT)

Hi Mario,

Thanks so much for the pointer to the problem! Now I have a better
understanding of what I was requesting on my region cards.

For the target, I wanted the union of the two bodies, tgtcyl and tgtcone.

> TARGET 5 +tgtcyl +tgtcone

which I now interpret as meaing the intersection of tgtcyl and tgtcone, not
their union. To get the union of these two bodies I write

> TARGET 5 +tgtcyl | +tgtcone

which I interpret as "points in tgtcone OR in tgtcyl".
However, regarding the void region, I want the void body minus both the
tgtcyl and tgtcone bodies. My original specification

> VOID 5 +void -tgtcyl -tgtcone

still seems to me to be correct. I interpret this as
"void and not tgtcyl and not tgtcone". This is, I think,
equivalent to your second suggestion for void below, which I
repeat here:

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

Let me know if you disagree. Many, many thanks for pointing
out my (now obvious!) mistake.

Thank you,
--Ray

On Sun, 28 Oct 2012, Santana, Mario wrote:

> 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:
> >
> >> 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 Mon Oct 29 2012 - 23:10:43 CET

This archive was generated by hypermail 2.2.0 : Mon Oct 29 2012 - 23:10:57 CET