Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How to create a workbench journal file

    • sadaspire
      Subscriber

      I am trying to run a FSI simulation using the system coupling set up in the Workbench. In order to speed up the sim, I plan to use the HPC but I have been struggling to create a journal file from the Workbench. Below is what I created so far using automatic creation. Could anyone know how to write the journal file for the system coupling in Workbench? Thank you for your help in advance. 


      # encoding: utf-8


      # Release 18.1


      SetScriptVersion(Version="18.1.463")


      template1 = GetTemplate(TemplateName="System Coupling")


      system1 = GetSystem(Name="FFF")


      system2 = template1.CreateSystem(


          Position="Right",


          RelativeTo=system1)


      setupComponent1 = system1.GetComponent(Name="Setup")


      setupComponent2 = system2.GetComponent(Name="Setup")


      setupComponent1.TransferData(TargetComponent=setupComponent2)


      system3 = GetSystem(Name="SYS")


      setupComponent3 = system3.GetComponent(Name="Setup")


      setupComponent3.TransferData(TargetComponent=setupComponent2)


      setupComponent1.Update(AllDependencies=True)


      setup1 = system1.GetContainer(ComponentName="Setup")


      setup1.SendCommand(Command='(cx-gui-do cx-set-list-tree-selections "NavigationPane*List_Tree1" (list ))')


      setupComponent3.Update(AllDependencies=True)


      setupComponent2.Refresh()


      setup2 = system2.GetContainer(ComponentName="Setup")


      AnalysisSettings1 = setup2.GetAnalysisSettings()


      AnalysisSettings1.EndTime = "500 "


      AnalysisSettings1.StepSize = "0.5 "


      dataTransfer1 = setup2.CreateDataTransfer(Name="Data Transfer")


      dataTransfer2 = setup2.CreateDataTransfer(Name="Data Transfer 2")


      participant1 = setup2.GetParticipant(Name="Solution 1")


      dataTransfer1.SetEntityProperties(Properties=Set(SourceParticipant=participant1, SourceRegion=None, SourceVariable=None))


      region1 = participant1.GetRegion(Name="fsi")


      dataTransfer1.SetEntityProperties(Properties=Set(SourceRegion=region1, SourceVariable=None))


      variable1 = GetDataEntity("/Setup 2/SystemCouplingVariable:force")


      dataTransfer1.SetEntityProperties(Properties=Set(SourceVariable=variable1))


      participant2 = setup2.GetParticipant(Name="Solution")


      dataTransfer1.SetEntityProperties(Properties=Set(TargetParticipant=participant2, TargetRegion=None, TargetVariable=None))


      region2 = participant2.GetRegion(Name="FSIN_1")


      dataTransfer1.SetEntityProperties(Properties=Set(TargetRegion=region2, TargetVariable=None))


      variable1 = GetDataEntity("/Setup 2/SystemCouplingVariable:FORC")


      dataTransfer1.TargetVariable = variable1


      dataTransfer2.SetEntityProperties(Properties=Set(SourceParticipant=participant2, SourceRegion=None, SourceVariable=None))


      dataTransfer2.SetEntityProperties(Properties=Set(SourceRegion=region2, SourceVariable=None))


      variable1 = GetDataEntity("/Setup 2/SystemCouplingVariable:INCD")


      dataTransfer2.SetEntityProperties(Properties=Set(SourceVariable=variable1))


      dataTransfer2.SetEntityProperties(Properties=Set(TargetParticipant=participant1, TargetRegion=None, TargetVariable=None))


      dataTransfer2.SetEntityProperties(Properties=Set(TargetRegion=region1, TargetVariable=None))


      variable1 = GetDataEntity("/Setup 2/SystemCouplingVariableisplacement")


      dataTransfer2.TargetVariable = variable1


      intermediateResultFilesOutputControls1 = setup2.GetIntermediateRestartDataOutputControls()


      intermediateResultFilesOutputControls1.OutputFrequency = "StepInterval"


      intermediateResultFilesOutputControls1.StepInterval = 5


       


       


       


       

    • sadaspire
      Subscriber

      Hi Peter, 


       


      Thank you for your reply. 


      Please find the attached Workbench project file. It would be appreciated to give me some advice. 


      Cheers, 


       

    • peteroznewman
      Subscriber

      Sorry, I can't help. I have never used journal files.

Viewing 2 reply threads
  • The topic ‘How to create a workbench journal file’ is closed to new replies.
[bingo_chatbox]