opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
- To: opal <opal AT lists.psi.ch>
- Cc: christof kraus <christof.j.kraus AT gmail.com>, "Locan Uldis (PSI)" <locans.uldis AT psi.ch>, "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
- Subject: [Opal] More than one SurfacePhysics Handler
- Date: Tue, 23 Jun 2015 18:25:11 +0000
- Accept-language: en-US, de-CH
- List-archive: <https://lists.web.psi.ch/pipermail/opal/>
- List-id: The OPAL Discussion Forum <opal.lists.psi.ch>
Dear colleagues I soliciting ideas how to handle the case of more than one SurfacePhysics Handler in
a simulation. This problem comes up if one is simulating a degrader with n-material slabs and n-1 gaps (vacuum == drift)
in between.
As an example consider:
DEGPHYS_Slab1 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge1: DEGRADER, L=0.00255124, ZSIZE= 0.00255124, OUTFN="Wedge1.h5", SURFACEPHYSICS=DEGPHYS_Slab1 , ELEMEDGE=4;
Deg_D1: DRIFT, L=0.0360075, ELEMEDGE=4.00255;
MDegD1: MONITOR, OUTFN="MDegD1.h5", ELEMEDGE=4.02055;
DEGPHYS_Slab2 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge2: DEGRADER, L=0.00510247, ZSIZE= 0.00510247, OUTFN="Wedge2.h5", SURFACEPHYSICS=DEGPHYS_Slab2, ELEMEDGE=4.03856;
Deg_D2: DRIFT, L=0.0360075, ELEMEDGE=4.04366;
MDegD2: MONITOR, OUTFN="MDegD2.h5", ELEMEDGE=4.06166;
DEGPHYS_Slab3 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge3: DEGRADER, L=0.00510247, ZSIZE= 0.00510247, OUTFN="Wedge3.h5", SURFACEPHYSICS=DEGPHYS_Slab3 , ELEMEDGE=4.07967;
Deg_D3: DRIFT, L=0.0360075, ELEMEDGE=4.08477;
MDegD3: MONITOR, OUTFN="MDegD3.h5", ELEMEDGE=4.10277;
DEGPHYS_Slab4 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge4: DEGRADER, L=0.00510247, ZSIZE= 0.00510247, OUTFN="Wedge4.h5", SURFACEPHYSICS=DEGPHYS_Slab4 , ELEMEDGE=4.12078;
Deg_D4: DRIFT, L=0.0360075, ELEMEDGE=4.12588;
MDegD4: MONITOR, OUTFN="MDegD4.h5", ELEMEDGE=4.14388;
DEGPHYS_Slab5 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge5: DEGRADER, L=0.00510247, ZSIZE= 0.00510247, OUTFN="Wedge5.h5", SURFACEPHYSICS=DEGPHYS_Slab5 , ELEMEDGE=4.16189;
Deg_D5: DRIFT, L=0.0360075, ELEMEDGE=4.16699;
MDegD5: MONITOR, OUTFN="MDegD5.h5", ELEMEDGE=4.18499;
DEGPHYS_Slab6 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
Wedge6: DEGRADER, L=0.00255124, ZSIZE= 0.00255124, OUTFN="Wedge6.h5", SURFACEPHYSICS=DEGPHYS_Slab6 , ELEMEDGE=4.203;
Alumina1: DRIFT, L=0.0003, ELEMEDGE=4.20555;
MDegD6: MONITOR, OUTFN="MDegD6.h5", ELEMEDGE=4.30585;
DEGRADER: LINE=(Wedge1,Deg_D1,MDegD1,Wedge2,Deg_D2,MDegD2,Wedge3,Deg_D3,MDegD3,Wedge4,Deg_D4,MDegD4,Wedge5,Deg_D5,MDegD5,Wedge6,Alumina1,MDegD6);
Now such an problem leads to an error in the ParallelTTracker at line 2009 ERRORMSG(“Internal ….
):
if(hasSurfacePhysics > 0) {
// in a section we have an element with surface physics
if(!surfaceStatus_m) {
msg << level2 <<
"============== START SURFACE PHYSICS CALCULATION =============" << endl;
surfaceStatus_m =
true;
// now get surface physics handler
reduce(sphysSection, sphysSection, OpMaxAssign());
if (sphys_m==NULL)
sphys_m = itsOpalBeamline_m.getSurfacePhysicsHandler(sphysSection);
else {
/* FixMe: this needs to be redone !
In case we have an other
handler, delete the first one and use the new one
*/
ERRORMSG("Internal error: try to allocate second SurfacePhysicsHandler - SRCFILE"
<< __FILE__ << " LINE " << __LINE__ << endl);
SurfacePhysicsHandler *sphysNew = itsOpalBeamline_m.getSurfacePhysicsHandler(sphysSection);
if (sphysNew != sphys_m && sphysNew !=
NULL) {
//delete sphys_m; FixMe: should do this right!!!
sphys_m = sphysNew;
}
}
}
if(sphys_m ==
NULL) {
INFOMSG("no surface physics attached" << endl);
}
else {
sphys_m->apply(*itsBunch);
sphys_m->print(msg);
}
}
else
if(surfaceStatus_m) {
if (sphys_m->stillActive()) {
sphys_m->apply(*itsBunch);
sphys_m->print(msg);
}
else {
msg << level2 <<
"============== END SURFACE PHYSICS CALCULATION =============" << endl;
surfaceStatus_m =
false;
}
}
I think we have to distinguish 2 cases:
a) the beam is in 2 or more materials at the same time.
—> this Ansatz will not work at all
b) In case the beam is always only in one material we. In that case we
need to find the correct SurfacePhysicsHandler.
—> maybe based on the extend of the beam?
For interested colleagues with good ideas I propose a google hangout at 3pm (CET) on June 25 or of course
a lively discussion on the mailing list.
Cheers Andreas
------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WBBA/219 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Friday: ETH CAB H 85.1 +41 44 632 75 22
============================================
The more exotic, the more abstract the knowledge,
the more profound will be its consequences.
Leon Lederman
============================================
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WBBA/219 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Friday: ETH CAB H 85.1 +41 44 632 75 22
============================================
The more exotic, the more abstract the knowledge,
the more profound will be its consequences.
Leon Lederman
============================================
- [Opal] More than one SurfacePhysics Handler, Adelmann Andreas (PSI), 06/23/2015
Archive powered by MHonArc 2.6.19.