Fluids

Fluids

CFD-POST – Transient Expression Data Exprort

    • b1othmane
      Subscriber
      I would like to automatically export values of three expressions that depend on time in a transient CFX simulation. These expressions use velocity variables (not defined in CFX-pre). Is there a way to do this because it is very time-consuming (I feel like I'm a slave ).n
    • Stephen Orlando
      Ansys Employee
      The easiest thing to do is create Monitors of these expressions in CFX-Pre, and then export the monitor data from the CFX Solver Manager.nIf you've already run the simulation, you'll need to use Perl Power Syntax to write a short script that loops over the timesteps and appends the expression values to a text file. Please see the documentation here for more info and examples: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/cfx_ref/i1308847.html.nTo get the CEL command that changes timestep, record a session file and change the timestep, then examine the session (.cse) created in a text editor. You'll need to incorporate this into your script.nSteven
    • b1othmane
      Subscriber
      CFX-Pre can't recognise my expression, as it uses solution variables (velocity u, v and w). So, I'm afraid your solution can't be applied in this case nAny alternatives ?n
    • b1othmane
      Subscriber

      The easiest thing to do is create Monitors of these expressions in CFX-Pre, and then export the monitor data from the CFX Solver Manager.If you've already run the simulation, you'll need to use Perl Power Syntax to write a short script that loops over the timesteps and appends the expression values to a text file. Please see the documentation here for more info and examples: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/cfx_ref/i1308847.html.To get the CEL command that changes timestep, record a session file and change the timestep, then examine the session (.cse) created in a text editor. You'll need to incorporate this into your script.Stevehttps://forum.ansys.com/discussion/comment/110864#Comment_110864

      CFX-Pre can't recognise my expression, as it uses solution variables (velocity u, v and w). So, I'm afraid your solution can't be applied in this case ?nAny alternatives ?n
    • Stephen Orlando
      Ansys Employee
      What's your expression? You'll need to use Velocity u instead velocity u. (Capital letter is needed for v in Velocity).n
    • b1othmane
      Subscriber
      I've used Velocity u with the capital letter. I find a problem with X, Y (the cartesian coordinates). It seems that CFX-Solver doesn't recognise them. It doesn't run and I get this message error The following unrecognised names were referenced:X, Yn
    • b1othmane
      Subscriber

      What's your expression? You'll need to use Velocity u instead velocity u. (Capital letter is needed for v in Velocity).https://forum.ansys.com/discussion/comment/110899#Comment_110899

      I have a lot of intermediate expressions, so I won't be able to show them all. I've used Velocity u with the capital letter. nI find a problem with X, Y (the cartesian coordinates). It seems that CFX-Solver doesn't recognise them. It doesn't run and I get this message error 'The following unrecognised names were referenced: X, Y'n
    • DrAmine
      Ansys Employee
      Make use of Algebraic expression based additional variable. They will allow use to use variables inside other expressions.nn
    • b1othmane
      Subscriber

      Make use of Algebraic expression based additional variable. They will allow use to use variables inside other expressions.https://forum.ansys.com/discussion/comment/110941#Comment_110941

      Should I create a variable in the name of X, Y and Z ? CFX-pre tells me theses objects already exist. I think I didn't understand well your answer.n
    • b1othmane
      Subscriber

      Make use of Algebraic expression based additional variable. They will allow use to use variables inside other expressions.https://forum.ansys.com/discussion/comment/110941#Comment_110941

      And also, I have this error : 'The function name 'areaInt' is not recognised.'n
    • DrAmine
      Ansys Employee
      There are CEL function which are not available in Pre or Solver or there you require the additional variable trick: 15.5. Quantitative Function List (ansys.com)nI can use areaInt inside CFX-Pre and Solve.Can you copy past the the expressions you are trying to use in CFX-Pre from the Expression Editor.n
    • b1othmane
      Subscriber
      Thank you DrAmine for your quick responses. I'll try your recommandations and then give you an update.n

      There are CEL function which are not available in Pre or Solver or there you require the additional variable trick: 15.5. Quantitative Function List (ansys.com)I can use areaInt inside CFX-Pre and Solve. Can you copy past the the expressions you are trying to use in CFX-Pre from the Expression Editor.https://forum.ansys.com/discussion/comment/111044#Comment_111044

      n
    • DrAmine
      Ansys Employee
      You are welcome!n
    • b1othmane
      Subscriber

      The easiest thing to do is create Monitors of these expressions in CFX-Pre, and then export the monitor data from the CFX Solver Manager.If you've already run the simulation, you'll need to use Perl Power Syntax to write a short script that loops over the timesteps and appends the expression values to a text file. Please see the documentation here for more info and examples: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/cfx_ref/i1308847.html.To get the CEL command that changes timestep, record a session file and change the timestep, then examine the session (.cse) created in a text editor. You'll need to incorporate this into your script.Stevehttps://forum.ansys.com/discussion/comment/110864#Comment_110864

      Thank you Steve. I have finally used a Perl Power Syntax script to make a timestep loop that exports a table containing my expressions to a csv file (a file for each timestep) that I combine thereafter. nP.S. I didn't manage to do it using monitors. n
    • DrAmine
      Ansys Employee
      You can even extract monitors from a finished run. You can try the cfx5dfile command and flags read-monitor. That can be extended with perl too.n
Viewing 14 reply threads
  • You must be logged in to reply to this topic.