Problem of using scuff-neq to calculate the infinite half-space
Opened this issue · 6 comments
Hi Homer,
I want to calculate the heat transfer between two semi-infinite parallel planes. I understand that two large cylinders can be set to approximate the semi-infinite case, but this will result in the required huge computation time and memory, and I also have some concerns about precision. So I want to set the .scuffgeo structure file such as the example of the infinite-area thin film as follows:
Similarily, the configuration of my structure file is based on the setting of the multi-layer structure as follows:
However, there is an error when running scuff-neq with this structure settings. The prompt is: Segmentation fault 11.
And here is the .log file:
Could you tell me where the problem is? I have been troubled by this problem for several days. It would be very helpful if you give any feedback. Thank you very much for your help!
Best wishes,
Frank
Hi Frank,
A Segmentation Fault is related to a memory problem, therefore the origin of such a problem is difficult to guess. Perhaps is the compilation of your code or a problem with the input. If you share your input files, I could test whether I get a segfault as well.
As an alternative, you could compile a debug version and try to debug the program to find out where the problem happens. To do that, you should run configure
with the flag --enable-debug
. Later run
gdb scuff-neq
run
backtrace
backtrace
will show you the chain of function calls to identify what had happened before the segfault. Hope this helps.
José.
Hi José,
Thanks for your suggestion. Since I am not so quite familiar with this, it would be very helpful if you can do the test for me. Here is the command line:
Scuff-neq --geometry doubleplate.scuffgeo --OmegaFile OmegaFile –EPFile EPFile
And the input files are in the attached ZIP.
InputFile.zip
Thank you for your kind help!
Frank
Hi Frank,
I also get the segfault. From gdb
you can see that the problem is in the kBloch
call. It is passed as a null pointer (0x0
), therefore the calculation of BPF trigers a segfault.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6cbda78 in scuff::StampInNeighborBlock (B=0x555555792820, GradB=0x0, NR=96, NC=96, M=0x5555557925e0, GradM=0x0,
RowOffset=0, ColOffset=0, L=0x7fffffffc3e0, kBloch=0x0, UseSymmetry=true) at AssembleBEMMatrix.cc:82
82 cdouble BPF=exp( II*(kBloch[0]*L[0] + kBloch[1]*L[1]) );
This is a copy of the backtrace
:
(gdb) backtrace
#0 0x00007ffff6cbda78 in scuff::StampInNeighborBlock (B=0x555555792820, GradB=0x0, NR=96, NC=96, M=0x5555557925e0, GradM=0x0,
RowOffset=0, ColOffset=0, L=0x7fffffffc3e0, kBloch=0x0, UseSymmetry=true) at AssembleBEMMatrix.cc:82
#1 0x00007ffff6cbfaaa in scuff::RWGGeometry::AssembleBEMMatrixBlock (this=0x555555776b50, nsa=0, nsb=0, Omega=..., kBloch=0x0,
M=0x5555557925e0, GradM=0x0, RowOffset=0, ColOffset=0, Accelerator=0x0, TransposeAccelerator=false, NumTorqueAxes=0, dMdT=0x0,
GammaMatrix=0x0) at AssembleBEMMatrix.cc:505
#2 0x000055555555a095 in WriteFlux (SNEQD=0x5555557769d0, Omega=..., kBloch=0x0) at WriteFlux.cc:244
#3 0x0000555555558bc1 in main (argc=7, argv=0x7fffffffcf38) at scuff-neq.cc:279
From the very beginning (read bottom to top) kBloch
is 0x0
(see #2
). I don't have much experience wih scuff, but it seems that the input file has a problem, because the extended geometry is not handled properly.
José.
What version of gmsh do you have installed?
@jmllorens
Hi José,
I found that it is because the command "scuff-neq" does not support the integration in Brillouin zone like other commands, such as "scuff-cas3d" and "scuff-ldos". That's why when I import the geometry file with a periodic geometry, it will returns the "Segmentation fault 11".
So I have no idea what we can do if we want to calculate the extended geometries with the "scuff-neq". Actually it's a very basic and important situation in calculating the near-field heat transfer. I have tried to use a huge structure to approximate the semi-infinite case, but the time and memory consuming is so horrible. If you have any idea to solve this problem, it will be very very helpful for me!
Thanks a lot for your help!
Frank
Hi,
My gmsh version is 3.0.9. Actually I have met trouble when using the newest version of gmsh, so I changed it to a old version. And after that it works well.
Frank