Geometry Plotting Issue

Dear Community,

I am facing a plotting issue of a similar nature to the one described by @makeclean on the following topic:

“plotting problem”.

In particular, I have replicated the example that can be found under the “Worked Example” section of the link:

“worked example”

and successfully simulated it using flair and the mainfludag executable.

The problem is that I am unable to plot the geometry using the plot panel of flair (Gnuplot). I have selected intervals such that the predefined geometry is enclosed by the plotted area.

In my understanding after hitting the plot button a temporary input file is produced along with a PLOTGEOM.STORE file which is converted to a gnuplot readable file (with a .dat extension if I am not mistaken).

Even though a PLOTGEOM.store file is produced in my case thanks to the PLOTGEO card I defined in the input file, hitting the plot button produces the error depicted in the attached screenshot. After inspecting the temporary input files produced by flair they seem to be incomplete (second screenshot attached), which is strange.

I am also attaching to this post all files I used for this simulation (i.e. .flair, .inp, .h5m) as well as the files produced after attempting to plot the geometry. Any suggestions on how to plot my geometry using gnuplot are more than welcome.

Kind regards,
Nikos.

flair_generated_files.zip (103.2 KB)
flair_input_files.zip (9.5 KB)

Hi @nnikolop you need to apply a small patch/correction to Flair, in fluka/input.py

Starting with line 2576, comment out the if flugg line and add the if not flugg line

		self.write(geoline[0]+"\n")
#               if flugg:                                                                 
#                       self.close()                                                      
#                       return None                                                       

	        # If VOXELS are present, write the first active one                       
	        if "VOXELS" in self.cards:
                        for card in self.cards["VOXELS"]:
				if card.notIgnore():
	                                self.write(card.toStr(fmt=FlukaCard.FORMAT_FREE)+\
"\n")
	                                break

		if not flugg:
		        self.write(geoline[1]+"\n")             # Write title   

Then you should be fine

Thanks

Andy

1 Like

Hi @makeclean,

thank you for providing the patch for flair, I went ahead and edited the input.py python script like so:

.

I still get a similar error (i.e. no PLOTGEOM.store file produced):

.

Also, the temporary input file looks like this (the double end statement may be causing trouble here):

the temporary file with a .err extension contains this message: Geoinp: unknown input card END.

Thanks again,
Nikos.

Sorry Nikos, i didnt test this before I sent it to you, this came from memory, let me test it this time, then get back to you

Sorry Nikos, one extra thing, you need indent the __write_geometry line too.

So

                if not flugg:
                        self.write(geoline[1]+"\n")             # Write title             

		self._writeGeometry(FlukaCard.FORMAT_FREE, FlukaCard.FORMAT_FREE)

becomes

                if not flugg:
                        self.write(geoline[1]+"\n")             # Write title             
                        self._writeGeometry(FlukaCard.FORMAT_FREE, FlukaCard.FORMAT_FREE)
1 Like