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.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Creating user defined variable in CFD Post

TAGGED: ,

    • SpencerJordan
      Subscriber
      Hi all,nI am having trouble creating a user defined variable in Fluent CFD Post. I have defined an expression to calculate saturation ratio as follows (I realize my units seem strange, but this was done to make it a unit-less number): n(1[Pa*K^2]*(exp(1[K]*(43.494[K^-1]-(6545.8/(Temperature+4.85[K])))))/((Temperature+594.85[K])^2))/(8.31446[(m^3)*Pa*(mol^-1)*K^-1]*H2o.Molar Concentration*Temperature)nThe expression gives me the correct values when I manually use it via the 'Evaluate' tab. However, when I assign this expression to a variable and try to create a contour of this variable nothing happens; the contour does not show up at all. I have the variable defined as a scaler. Is there another step I need to take in order for this contour to be able to be plotted? Thanks in advance. n
    • Surya Deb
      Ansys Employee
      Hello, nOnce you create the variable, can you check the max and min ranges in the Variable definition? Do you see them or are they undefined?nCan you try to use Local Scale Sizing as well for the contour?nRegards,nSuryan
    • SpencerJordan
      Subscriber
      Thanks for the reply Surya. No, I cannot see the min and max range values even after assigning it as local scale sizing. I think it may have something to due to the fact that I have multiple results loaded into CFD-Post. Would I need to reference, for example, the Temperature variable as 'Temperature@CASE:casename'?n-Spencer n
    • SpencerJordan
      Subscriber
      Also, after some investigation, the problem seems to lie with having two different variables referenced by the expression. If I create a test expression with only one variable referenced the contour works finen
    • Surya Deb
      Ansys Employee
      Hello Spencer, nCan you check if the denominator is somehow going to zero? If so, then adding a very small value to the denominator might help in this case. It might be possible if the H2o.Molar Concentration is zero is certain parts of the domain.nnRegards,nSuryan
    • SpencerJordan
      Subscriber
      I gave that a try but still no luck... I'm getting an error that reads as follows: 'Vertex' values for Variable 'Sat Ratio' do not exist on Geometry /PLANE:mid placen
    • SpencerJordan
      Subscriber
      I have figured it out! I had to export the temperature and molar concentration data separately in a CDAT file, now the contour is working fine. Thanks for the help Surya. n
    • Surya Deb
      Ansys Employee
      Sounds good Spencer!nRegards,nSuryan
Viewing 7 reply threads
  • The topic ‘Creating user defined variable in CFD Post’ is closed to new replies.
[bingo_chatbox]