LS Dyna

LS Dyna

Topics related to LS-DYNA, Autodyn, Explicit STR and more.

ICFD User-Defined Boundary Condition through dyn21icfd.F

    • Giorgos Troulliotis
      Subscriber

      Dear all,

      Could you please explain the steps for creating a user-defined boundary condition for the ICFD solver using dyn21icfd.F?I am applying a negative value on the load curve to force the solver to go through the subroutine but to no avail.I have  tried to modify the makefile to create the  dyn21icfd.obj but I still cannot set a boundary condition.I don't think that the solver goes through the subroutine as I wrote a print statement to check.I can attach a copy of the .k file and the .F file if needed.Thank you in advance,George

    • Ushnish Basu
      Ansys Employee

      The LCID<0 feature is still undocumented, but it should work. Which card are you using this with, and which version of LS-DYNA are you using? Ansys employees cannot download attachments from forum posts, so please provide as much detail as feasible in a post here itself.

    • Giorgos Troulliotis
      Subscriber

      Hi Ushnish,

      I am using LS-DYNA 2022 R2 and I am also compiling the SMP version of LS-DYNA . I have attached the BC section of the .kfile, the modified makefile, the modified dyn21icfd.F and the error message from the command prompt. 

      Please let me know if you need any more information.

      Many Thanks,

      George

    • Ushnish Basu
      Ansys Employee

      George,

      Just to confirm - do you have a curve with ID 1 in your model?

      Ushnish

    • Giorgos Troulliotis
      Subscriber

      Hi Ushnish,

      Actually, when I added a LC with ID 1 the solver starts, again without going through the subroutine.

      When I change -1 to -2 on the boundary condition card and I add a LC with ID 2 the solver still gives the same error "Load Curve ID 1 not found".

      So I am confused as to how that works.

      Does the magnitude of the negative number mean anything to the solver?

      Does the solver always look for LCID 1 when a negative number is applied?

      Many Thanks,

       

      George   

    • Ushnish Basu
      Ansys Employee

      We have fixed a bug in latest versions of LS-DYNA. Please ask your Ansys support coordinator or software administrator to request an updated version via a service request on the Ansys customer portal

    • Giorgos Troulliotis
      Subscriber

      Alright I will do that, thank you very much.

    • Reno Genest
      Ansys Employee

      Hello George,

      Which DEV solver do you need? SMP? MPP? Windows? Linux? Single or double  precision? If you could send me a screenshot of the LS-DYNA banner for the solver  you are already using this would be helpful.

       

      Reno.

    • Giorgos Troulliotis
      Subscriber

      Hi Reno,

      Please find attached the requested banner.

      I have also tried running the subroutine with current release LS-DYNA R13 and I am still unable to get the solver to call the subroutine.

      Are you aware of  any specific steps that need to be taken before attempting to call dyn21icfd.F?

      I noticed that for standard compilation no dyn21icfd.obj is created. 

      Many Thanks,

      George

    • Reno Genest
      Ansys Employee

      Hello George,

       

      I will send you the latest DEV solver. Also, I don't know much about user-defined features; my colleague Ushnish is our expert and he is the right person to ask about specific steps.

       

       

      Reno.

    • Reno Genest
      Ansys Employee

      Hello George,

      We  don't have the latest SMP DEV usermat solver for Windows and the person who can compile it is currently on vacation. He should be back on Friday. I will let you know when I hear from him.

      Also, note that the MPP solver is recommended with ICFD in general. Using MPP would probably make your subroutine more complex  though.

       

      Reno.

    • Giorgos Troulliotis
      Subscriber

      Hi Reno,

      Thank you very much for the help. 

      I think I'll start working on the subroutine using the SMP solver and then transition to MPP if necessary.

      Best Regards,

      George

    • Giorgos Troulliotis
      Subscriber

      Dear Ushnish,

      Following the above discussion I received a Dev version of LS-DYNA to use the dyn21icfd.F feature. 

      The new version did call the subroutine when using a negative LCID value.

      However, when I change the subroutine and recompile the solver seems to follow the original code shipped with the dev version. 

      I also tried to add the dyn21icfd.obj file in the makefile but the solver still does not reflect the changes in the subroutine.

      This lead me to believe that the subroutine was precompiled in one of the library files and as such the changes which I make are not called during execution.

      Would it be possible to receive a dev version which would not have the subroutine precompiled but rather call the corresponding .obj file during the solution?

      Best Regards,

      George

    • Ushnish Basu
      Ansys Employee

      George,

      Apologies for the delayed response to this. At least on Linux, changes to the subroutine icfd_userdefinedbc are recognized. Possibly it was a packaging problem with the Windows version. I will ask our WIndows expert to take a look.

      Best,

      Ushnish

       

    • Webster
      Subscriber

      Dear all,

      I have experienced a similar problem as the one discussed in this post. I modified the subroutine icfd_usercircuit from dyn21icfd.F and set my Winkessel type boundary condition WTYPE = 6. According to the latest released manual (not yet merged into the main manual), this keyword has been significantly revised which now allows users to customise their own circuit. The compilation (the only current opinion) was performed on a Windows PC with Intel OneAPI for the static linkage. And the object package I am using is dev pc-dyna smp.  Yet, it seems that my execution could not locate this subroutine for the proper execution. Any possible fixitions here...?

      Much appreciated 

       

      • Giorgos Troulliotis
        Subscriber

        Hi Binghuan,

        So far, I haven't been able to compile a working version of the solver which reflects changes in dyn21icfd.F however, I might be able to suggest a method for implementing a custom windkessel model, until the subroutine issue is figured out. 

        You can use uctrl1 in dyn21.F to update the value of load curves during the solution phase. In the subroutine you can read the output file of *ICFD_DATABASE_FLUX to get the variables needed for numerical integration of your custom equations and assign the result to the specified load curve. 

        I haven't used this myself for windkessel models but it might be worth having a look.

        • Webster
          Subscriber

          Dear George and the Dev Team,

          Thank you for your suggestion. I will have a look while we waiting for the responses from the dev.

          Btw, I agree with you that I also suspect the subroutines defined in dyn21icfd.F were precompiled in a certain library, hence, any user modified changes could not be reflected during the execution. Probably the simplist example from my side is I can see the same characters got printed out in my history file, although I have modified my write statements and re-compiled the code.

          Best,

          Binghuan

           

        • Giorgos Troulliotis
          Subscriber

          Hi Binghuan,

          I forgot to mention that for the aforementioned method to work you need to use the following "trick". Since the ICFD solver reads load curves as static objects it will not update the values you assing using uctrl1. Instead you can use *DEFINE_CURVE_FUNCTION as input to you boundary condition and point it to the empty *DEFINE_CURVE you change with uctrl1. I have attached an image of the input file for reference. 

          Since the ICFD solver calls *DEFINE_CURVE_FUNCTIONs during solve you should be able to get the desired effect.

          Best,

          George

Viewing 14 reply threads
  • The topic ‘ICFD User-Defined Boundary Condition through dyn21icfd.F’ is closed to new replies.