Fluids

Fluids

export node temperature using udf

    • jscsgh
      Subscriber
      Hiya,

      I am modelling a transient case with two phases, and I would like to know the temperature development of the nodes in a certain thread. I used udf to export the coordinates of the wanted nodes successfully. However, I had some problems when I tried to export the temperature. I defined the field variable name using the following lines: 

      char *what = "temperature";
      Node_Function_Values(d, what);

      And I tried to obtain the temperature value using NODE_VALUE(v). But it reports as follows when I tried to print the temperature value. 

      Error: floating point exception

      Error Object: #f

      The fl process could not be started.

      What is the possible reason which would cause this?

      Is it possible that the 
      field variable name that I am using is not right, since it is a multiphase case. How can I know the list of field variable names that I can use in the function Node_Function_Values(d, what); for a multiphase case.

      Many thanks for your time and wish to hear from you soon. 

      Best regards
      Heng

    • Rob
      Ansys Employee
      Depending on what you want to do with the data you may find the File>Export options to be better, node data can be written out every some time steps for analysis. 

      Which multiphase model? Some use a phase domain, some calculate temperature at the mixture level. 
      • jscsgh
        Subscriber

        Hi Robert, many thanks for your reply, and appologies that I didn't respond to your answer asap (in the old forum, once I received a reply, I will receive an email...it seems that this feature is not available in the new forum).

        Regarding the export options, I will check that. But the idea is that I am planning to export the node temperature in a certain thread with specific sequencing every time step. That's the reason why I would like to use UDF to export, but it seems that the function Node_Function_Values(d,temperature) is not working for a multiphase model. 

        In terms of the multiphase model, I am using VOF model and I would like to export the mixture temperature of the node each timestep.

        Again many thanks for your time, and if you have some idea on how to use Node_Function_Values(d,temperature) in a multiphase case, please do let me now. Cheers!

    • DrAmine
      Ansys Employee

      ASCII Export should make the job.

      • jscsgh
        Subscriber

        Dear Amine, many thanks for your reply. I have tried ASCII Export, but the result is that the node coordinate is listed in a random order. I am planning to export them in a required sequence and in a certain thread. That's the reason why I am using UDF. Do you know how I can use Node_Function_Values(d,temperature) in a VOF multiphase case. Many Thanks again!

    • Rob
      Ansys Employee

      No worries, IT are still hunting gremlins, once they're all caught I think we'll have emails etc. 

      Strictly Fluent uses cell values, so have a look at C_T(c,t) 

Viewing 3 reply threads
  • You must be logged in to reply to this topic.