Fluids

Fluids

Help with dynamic mesh events

    • aCVP
      Subscriber
      Hello ANSYS Learning Forum,nI am working with dynamic mesh events. I have 20 predefined meshes. I need to replace the mesh and interpolate results across mesh every time step.nLet's say I have 200 time steps in total.nI do not want to have to define the dynamic mesh events 200 times, just repeat the same 20 events over and over again. How can I do this?nPlease advise if possible. Thanks.n
    • DrAmine
      Ansys Employee
      Does the event occur every 20 time steps? Do you want to code N Events which are similar. Event can be defined at time. Same can be done with Caclulation Activities if you know what to do.n
    • aCVP
      Subscriber
      Thank you for your reply. To clarify: one event occurs EVERY timestep and the cycle repeats after 20 timesteps.nEvent1 - at timestep 1nEvent 2 - at timestep 2n[...]nEvent 20 - at timestep 20nHow do I get Event 1 to happen again at timestep 21? and then Event 2 at timestep 22, etc?.
    • aCVP
      Subscriber
      It might be more helpful to ask: What are the TUI commands I can use to make a dynamic mesh event occur or execute?n
    • Rob
      Ansys Employee
      You may be better off defining the actions based on crank angle to get the cyclic behaviour - look at the options available in the GUI. Re the TUI commands, click into the TUI window and explore and/or read the TUI manual. n
    • aCVP
      Subscriber
      Hi and thank you for your response!nI'm having a bit of difficulty understanding how the crank angle GUI can be used for this application. I need to replace an entire mesh every X time steps. nAs for the TUI commands, I do not see one for executing a dynamic mesh event. I can, however, find a TUI command for reading/writing the event file. I have provided an image of what's in the file after writing.nCan this command be used in the Execute Commands tab under Calculation Activities in Fluent?My confusion comes from differences in syntax and if it is compatible with the Execute Commands language. Additionally, I need the event to repeat every X time steps, whereas the event in the picture below only occurs at one time.nAny advice would be helpful - and I would be happy to provide more information if needed. Thanks in advance!nn nn
    • aCVP
      Subscriber
      Specifically, let's say I have the following event file:n(n((active . #t) (name . event-0) (start . 0.01) (action 16 Y:/Desktop/EVENTS - test/ap1.msh #t))n((active . #t) (name . event-1) (start . 0.02) (action 16 Y:/Desktop/EVENTS - test/ap2.msh #t))n((active . #t) (name . event-2) (start . 0.03) (action 16 Y:/Desktop/EVENTS - test/ap3.msh #t))n)nnI need to execute this file again at 0.04s, but now the time has changed so event-0 should occur at 0.04, event-1 at 0.05, and event-2 at 0.06.How can I do this with Execute Commands?n
    • aCVP
      Subscriber
      Sorry for all the posts, I am updating as I am working through the issues and debugging.nMy question now is with syntax and executing the dynamic mesh event within a scheme file.nHere is what I've done:nTurn on dynamic mesh, and add an event through the GUI at time 0. I then write the event to a journal file. The journal file reads: ((active . #t) (name . event-0) (start . 0.00) (action 16 Y:/Desktop/EVENTS - test/ap1.msh #t))nNow, I want to be able to change the start time of this event. In my scheme file, can I insert a variable for time (k) into the event file command...for example (start . k)? How do I do this? nIf I use the code from the event journal file, do I still need dynamic mesh checked and the events checked on in the GUI? Will results be interpolated across meshes if I use the scheme route rather than the GUI? My interpretation is that the scheme file with the TUI command takes over the function of the GUI so I do not need to have dynamic mesh checked in the GUI. I am not sure if this correct, though.nAgain, thank you for your continued help.
    • Rob
      Ansys Employee
      In the GUI we have:nIt may be easier to set up everything here and avoid the TUI. n
    • aCVP
      Subscriber
      With the GUI, I can set event-0, event-1, event-2 etc. at a certain time, but I need to repeat these events every X time steps. nFor example: nEvent-0 @ 0.01s = replace mesh-0 with mesh-1 (interpolate data across zones)nEvent-1 @ 0.02s = replace mesh-1 with mesh-2 (interpolate data across zones)nEvent-2 @ 0.03s = replace mesh-2 with mesh-0 (interpolate data across zones)nand then at 0.04s I need to do Event-0 again, at 0.05s I need to do Event-1 again, and at 0.06s I need to do Event-2 again and so on. Let's say I need to do this until we reach 2s. I can manually put all these events into the GUI, but this would be hundreds of events I would have to manually type in. nnIs there an easier way to do this? Possibly with a scheme file, Execute Commands, and Calculation Activities? Alternatively, in the GUI or scheme file, is there a way to specify multiple times for an event to occur? For example, in the At time (s) box, is there a way to input a list of times [0.01s, 0.04s, 0.07s...etc.] so I can avoid having to make separate events for all these times because they are doing all the same action?.Please let me know if you can. Thanks!n
    • Rob
      Ansys Employee
      Having opened the file you get when you write out an event you'll see the format. Copying the command part of the file:nn(n((active . #t) (name . event-2) (start . 20.) (action 16 /Scratch/pipe_r18p2.msh #t))n((active . #t) (name . event-3) (start . 30.) (action 16 /Scratch/pipe2_r18p2.msh #t))n)nnIt looks like you can generate the text file that needs reading in once with all of the commands. All you need to update is the time & filename. nn
    • aCVP
      Subscriber
      This sounds good. I will use this. To clarify: I define event-0, event-1, and event-2 in the GUI and write the file. It will generate the code. I can then go into the text file and put different times.When I go to execute the code with Execute Commands, do I still need to have the dynamic mesh events GUI checked and activated? Or is that only for generating the file initially? I am assuming not because the journal file now takes over.nnPlease let me know if you can. Thanks again for all the help.n
    • aCVP
      Subscriber
      I can't get it to work with Execute Commands, but it works if I write my event file, then copy/paste to put more events at different times, and then read it in through the events GUI. Hopefully having so many events won't be a problem, but it seems to be working for now, so I will close this ticket.Thanks again for all of your help!n
    • Rob
      Ansys Employee
      Once the Events are there you don't need the Execute commands. n
Viewing 13 reply threads
  • You must be logged in to reply to this topic.