Menu

Radiant/impedant/custom boundary condition panels with GMSH inputs

mathias
2017-03-31
2021-12-21
  • mathias

    mathias - 2017-03-31

    Hello,

    first off: I am very impressed with the capabilites and usability of acousto. I have a relatively complex simulation setup for sound propagation in a closed duct. My "geoms" statement is a list of multiple MSH entries and a few geometrical primitives. Now I would like to assign properties such as radiance/impedance to some of the surfaces. I have trouble understanding how to assign properties to mesh surfaces. I can modify the radiating box tutorial and see some principles but there are only primitives in this file and no meshes and it is not enough to continue on my own. How will acousto order the mesh surfaces if there are multiple geometries? How do the index numbers in the .panels files correspond with the surfaces?

    Thanks in advance

     

    Last edit: mathias 2017-03-31
  • Umberto Iemma

    Umberto Iemma - 2017-04-01

    Mathias,

    thanks for using acousto. The way to provide different properties to different boundaries of a complex geometry with acousto 1.6 is a little bit cumbersome, we admit. What you want to do is possible, but for very complicated geometries can be painful. I suggest you to wait version 2.0, that we plan to release by the end of next week. It is ready, and we are completing the fundamental tests. One of the major improvements of the new release is exactly what you need.

    Umberto

     
  • mathias

    mathias - 2017-04-03

    Hello Umberto,

    thanks for your quick reply! I will gladly wait for revision 2.0 then.

    Mathias

     
  • Max Funk

    Max Funk - 2021-04-29

    Hello Umberto Iemma,

    many thanks for your program...

    I tried to convert the tutorial: Room_Acoustics to the new boundary conditions custombc=2 with the physical tags of the gmsh file.

    But now I get an error message:

    2021-04-29 15:33:56 DEBUG [1/1] modsolinfo->custombc=2
    2021-04-29 15:33:56 DEBUG [1/1]  Allocating 24 for sizeof(struct phystag)*config_setting_length(phystagcont)
    2021-04-29 15:33:56 INFO  [1/1] n physical tags = 3
    2021-04-29 15:33:56 DEBUG [1/1] reading physical tag [floor]
    2021-04-29 15:33:56 ERROR [1/1] You must provide a valid physical tag
    

    I tried many things, but cannot find the reason, the .msh file is looking fine:

    $MeshFormat
    2.2 0 8
    $EndMeshFormat
    $PhysicalNames
    3
    2 13 "floor"
    2 14 "wall"
    2 15 "ceil"
    $EndPhysicalNames
    $Nodes
    5570
    1 0 0 0
    2 0 0 3.98
    3 8.16 0 0
    4 8.16 0 3.98
    5 0 7.41 0
    6 0 7.41 3.98
    7 8.16 7.41 0
    8 8.16 7.41 3.98
    9 0.2266666666662526 0 0
    10 0.4533333333324582 0 0
    [...]
    5569 1.940619845371618 7.41 0.8689248800028653
    5570 1.829114969126655 7.41 1.008218762031749
    $EndNodes
    $Elements
    11136
    1 2 2 13 1 375 644 646
    2 2 2 13 1 644 645 646
    3 2 2 13 1 644 403 645
    [...]
    

    and the boundcond section of the .cfg file

    custombc=2;       # boundcond type gmsh
     gmshbc=["floor", "wall", "ceil"];
     floor={
       tag = 13;
       re_lambda = 1.0;
       im_lambda = 0.0;
       re_gamma = 0.0;
       im_gamma = -23.813;
       # re_f = real part of f ;
       # im_f = imaginary part of f ;
     };
     wall={
       tag = 14;
       re_lambda = 1.0;
       im_lambda = 0.0;
       re_gamma = 0.0;
       im_gamma = -23.813;
       # re_f = real part of f ;
       # im_f = imaginary part of f ;
     };
     ceil={
       tag = 15;
       re_lambda = 1.0;
       im_lambda = 0.0;
       re_gamma = 0.0;
       im_gamma = -23.813;
       # re_f = real part of f ;
       # im_f = imaginary part of f ;
     };
    

    I have Acousto 2.0 and the original example: Room_Acoustics is working fine...

    Perhaps you can see directly an error, or perhaps there is a working example with custombc=2 ?

    Thanks in advance

     
    • Giorgio Palma

      Giorgio Palma - 2021-04-29

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      Dear Max, if you would provide me the input files set you are trying I'll be glad to help you!
      All the best
      Giorgio

      Il 29 apr 2021 16:08, Max Funk <mf3@users.sourceforge.net> ha scritto:

      Hello Umberto Iemma,


      many thanks for your program...


      I tried to convert the tutorial: Room_Acoustics to the new boundary conditions custombc=2 with the physical tags of the gmsh file.


      But now I get an error message:


      2021-04-29 15:33:56 DEBUG [1/1] modsolinfo->custombc=2
      2021-04-29 15:33:56 DEBUG [1/1] Allocating 24 for sizeof(struct phystag)*config_setting_length(phystagcont)
      2021-04-29 15:33:56 INFO [1/1] n physical tags = 3
      2021-04-29 15:33:56 DEBUG [1/1] reading physical tag [floor]
      2021-04-29 15:33:56 ERROR [1/1] You must provide a valid physical tag

      I tried many things, but cannot find the reason, the .msh file is looking fine:

      $MeshFormat
      2.2 0 8
      $EndMeshFormat
      $PhysicalNames
      3
      2 13 "floor"
      2 14 "wall"
      2 15 "ceil"
      $EndPhysicalNames
      $Nodes
      5570
      1 0 0 0
      2 0 0 3.98
      3 8.16 0 0
      4 8.16 0 3.98
      5 0 7.41 0
      6 0 7.41 3.98
      7 8.16 7.41 0
      8 8.16 7.41 3.98
      9 0.2266666666662526 0 0
      10 0.4533333333324582 0 0
      [...]
      5569 1.940619845371618 7.41 0.8689248800028653
      5570 1.829114969126655 7.41 1.008218762031749
      $EndNodes
      $Elements
      11136
      1 2 2 13 1 375 644 646
      2 2 2 13 1 644 645 646
      3 2 2 13 1 644 403 645
      [...]
      

      and the boundcond section of the .cfg file

      custombc=2;       # boundcond type gmsh
       gmshbc=["floor", "wall", "ceil"];
       floor={
         tag = 13;
         re_lambda = 1.0;
         im_lambda = 0.0;
         re_gamma = 0.0;
         im_gamma = -23.813;
         # re_f = real part of f ;
         # im_f = imaginary part of f ;
       };
       wall={
         tag = 14;
         re_lambda = 1.0;
         im_lambda = 0.0;
         re_gamma = 0.0;
         im_gamma = -23.813;
         # re_f = real part of f ;
         # im_f = imaginary part of f ;
       };
       ceil={
         tag = 15;
         re_lambda = 1.0;
         im_lambda = 0.0;
         re_gamma = 0.0;
         im_gamma = -23.813;
         # re_f = real part of f ;
         # im_f = imaginary part of f ;
       };
      

      I have Acousto 2.0 and the original example: Room_Acoustics is working fine...

      Perhaps you can see directly an error, or perhaps there is a working example with custombc=2 ?

      Thanks in advance



      Radiant/impedant/custom boundary condition panels with GMSH inputs




      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/acousto/discussion/852635/


      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


      </div>
      
      </div>
      


       
  • Giorgio Palma

    Giorgio Palma - 2021-04-29

    Dear Max, if you would provide me the input files set I'll be glad to help you and solve the problem!

     

    Last edit: Giorgio Palma 2021-04-29
  • Max Funk

    Max Funk - 2021-04-30

    Hallo Giorgio,
    thank you, that's a great offer :-)
    I include the project files below...

     
    • Max Funk

      Max Funk - 2021-04-30

      In the boundary condition I have two frequencies... There is also the question, if I would calculate e.g. a frequency response, does the program make an interpolation for the frequency dependent boundary condition?

       
      • Giorgio Palma

        Giorgio Palma - 2021-05-05

        no, at the moment the user is responsible to provide a number of boundary conditions equal to the number of frequencies to evaluate for each bc group (floor0, floor1, ... walls0, walls1, etc. in your case), or to provide a non frequency dependent bc for each group (floor, walls, etc.)

         
        • Max Funk

          Max Funk - 2021-05-05
           

          Last edit: Max Funk 2021-05-07
          • Max Funk

            Max Funk - 2021-05-05

            Thanks for the info.

             

            Last edit: Max Funk 2021-05-07
    • Giorgio Palma

      Giorgio Palma - 2021-05-03

      Dear Max,
      I found two problems in the acousto input file:

      • the structures defining the custom bc must be outside of the modsol structure:

      modsol={ # solver module
      active=1;
      [...]
      }
      ceil0={
      tag = 15;
      re_lambda = 1.0;
      im_lambda = 0.0;
      re_gamma = 0.0;
      im_gamma = -23.813; # alpha=0.25, f=325Hz
      };

      • all the physical tags present in the msh file must be defined in the cfg file:

      modsol={ # solver module
      [...]
      gmshbc=["ceil%d", "floor", "wall"]; (OR gmshbc=["ceil%d", "floor%d", "wall%d"]; depending if you want to have frequency dependent impedances from all the boundaries or not)
      [...]
      }

      and consequently structures defining the relative bc
      ceil0={
      [...]
      };

      ceil1={
      [...]
      };

      wall={
      [...]
      };

      floor={
      [...]
      };

      I attach you a "working" cfg. I used "working" as I did not wait for the run to finish, but it started the evaluation 😉

      All the best,
      Giorgio


      Da: Max Funk mf3@users.sourceforge.net
      Inviato: venerdì 30 aprile 2021 17:12
      A: [acousto:discussion] 852635@discussion.acousto.p.re.sourceforge.net
      Oggetto: [acousto:discussion] Radiant/impedant/custom boundary condition panels with GMSH inputs

      Hallo Giorgio,
      thank you, that's a great offer :-)
      I include the project files below...

      Attachments:


      Radiant/impedant/custom boundary condition panels with GMSH inputshttps://sourceforge.net/p/acousto/discussion/852635/thread/e3a67dc9/?limit=25#3fe3


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/acousto/discussion/852635/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      • Max Funk

        Max Funk - 2021-05-05

        Hallo Giorgio,

        thank you for the reply and the help

        That was it, I didn't see that the definition of the custombc had to be outside the modsol structure....

        Now it calculates well :-))

         
  • Max Funk

    Max Funk - 2021-05-12

    Hallo Acousto team, Giorgio,

    I investigated further custom boundcond 2 and everything is fine when the number of frequencies nome =... equals the number of boundary conditions, e.g.

    gmshbc=["wall%d",...];
    nome=3;
    ...
    wall0={...}; wall1={...}; wall2={...}; ...
    

    or

    gmshbc=["wall",...];
    nome=1;
    ...
    wall={...}; ...
    

    However, if nome is greater than the number of given conditions, even with frequency independent conditions

    gmshbc=["wall","ceil", "floor"];
    nome=3;
    ...
    wall={...}; ceil={...}; floor={...};
    

    then it is crashing with an error

    ****************    Memory Estimate    ***************
    ...
    Signal: Segmentation fault (11)
    Signal code: Address not mapped (1)
    [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f8acd7823c0]
    [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) 
    

    Is this a given restriction? In that case, no frequency response analysis would be possible without writing huge numbers of boundconds, e.g.

    nome=100;
    ...
    wall0={...};
    ... ... ...
    wall99={...};
    

    Perhaps it is a bug from my side or from the software? I attach the project... with nome=1 it works fine, with nome=2 it is crash...

     
    • Giorgio Palma

      Giorgio Palma - 2021-05-12

      thank you Max for your precious work. I'll investigate this and come back with something as soon as possible!

       
    • Giorgio Palma

      Giorgio Palma - 2021-05-18

      Hello Max,
      I made a couple of tests and dug into our commits.
      The bad news is that you found a bug of acousto2.0.
      The good news is that it had been already discovered some time ago while we were developing acousto, and it is fixed in the v2.5, which is going to be released very soon.
      At the moment, a way I can imagine to overcome the issue is to let custombc=2 to write a the bc files with nome=1, and then use custombc=1 with wathever nome.

      All the best,
      Giorgio

       

      Last edit: Giorgio Palma 2021-05-19
      • Max Funk

        Max Funk - 2021-05-31

        Hallo Giorgio,
        many thanks for your investigation and your reply :-)

        It's valuable to see that custombc 2 does no more than writing the boundcond file and then performing the same as custombc 1
        I have now created the boundcond with a simple script file; perhaps it could be attached to the RoomAcoustics tutorial; I attach it below...

        As a feedback, I wanted to say, that at the moment I prefer custombc=0 because in a simple calculation I need just a frequency-independent absorption coefficient, which I do not get with a frequency-independent custombc=1 or 2...

        Ideally it would be like this:
        1) one could give either impedance or lambda/gamma/f (with default always hard wall)
        and then
        2) one could provide this with a definition in the .cfg file, with a separate .panels file or with physical tag in the mesh file

        To summarise, at least I would strongly recommend not to remove the simple boundary condition custombc=0 from the program, as was announced in the user guide...

        Best regards and thank you for the program - Max

         
  • honestguvnor

    honestguvnor - 2021-12-21

    Given the developments to acousto over the last few years (and I think someone mentioned a change in direction?) is it worth my while to modify the current code to fix whatever is causing it to abort (possible double free during shutdown which did not prevent testing) and, more importantly, modify the user interface to better support engineering studies.

    Also I note that project development has taken place for several years outside the public repository. Is this way of working likely to continue into the future?

    The above is not intended to be a criticism. It is good to see an open source acoustic BEM code that has not been lost to "C++" tendencies. Many years ago when I worked in academia the university and/or sponsors owned the copyright to software and something like this was not possible. The university was happy to transfer copyright back to the authors for papers but not software which they considered to be of financial value. Of course they had no workable way to do anything with the value they claimed to see but that's academia for you.

     

Log in to post a comment.