Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Using UDMI in UDF as boundary condition

    • Sanda
      Subscriber

      In ANSYS Workbench, I used Transient Structural (for structure) and Fluid Flow (Fluent) (for pulse wave).

      The assumed calculation was in time domain transient based, Second-order implicit and boundary conditions are velocity inlet and pressure outlet.

       Currently, I am conducting couple analysis with fluid and structural analysis of the viscoelastic tube. And I plan to create an non-reflecting boundary condition in the couple analysis of ANSYS Workbench under the same boundary condition.

      From conservation of mass and conservation of momentum, the boundary condition of numerical solution at the end of tube with iteration of time and space steps is as follows

    • Karthik Remella
      Administrator
      Hello If you are applying this condition at the exit, why not use the Fluent expressions (instead of a UDF)? It is much simpler to implement. Look at the following link from the user's guide.
      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/flu_ug/flu_ug_expression_syntax.html
      I don't completely understand your comment on creating a new zone ID. You are applying the analytical condition at the outlet, right?
      Karthik
    • DrAmine
      Ansys Employee
      Reflection free in terms of Acoustic waves? Please have a look into NRBC or TFF in Fluent User's Guide.
    • Sanda
      Subscriber

      Thank you very much for your kind suggestion.
      My first idea was in UDF so that when I recall the variable from previous space step, I need to identify cell zone ID for the time loop in the UDF equation.
      Thank you for your advice. But I am applying space iteration equation in time iteration and this is my current challenge.
      P(n-1) and Q(n-1) are the variables from previous space step and I need to recall these variables to use in that equation. As your kind suggestion, Fluent expression could be done, but May I know how to recall those variables from previous space step?

    • Sanda
      Subscriber
      Dear DrAmine Thank you for your suggestion and sorry for late reply.
      As far as I know, General NRBC conditions only works in steady state static condition and I would like to apply in time domain transientin Pressure Based condition.
      May I know what is TFF? and there is an option in boundary condition "Prevent Reverse Flow" but it resulted negative pressure outlet after I applied as boundary condition.
    • Karthik Remella
      Administrator
      Hello I'm not sure if I understand your ask and the nomenclature you are using. Could you please elaborate on what you mean by "Space Step"?
      Karthik
    • Sanda
      Subscriber
      Dear Karthik Thank you very much for the follow up. I am not very sure but my plan to execute to program for boundary condition is as below.
      The space step is supposed to be the sectional elements of the tube. (may be it is called cell zone in fluent).
      The target is to use the information of volumetric flow rate of immediate previous element in the next element (which is the outlet).
      P(n-1) and (Qn-1) will be the information from yellow cell zone and it will be used in UDF for the pressure outlet boundary condition.
      User defined scalars can store the information but from my understanding it can only execute at the postprocessing. But this equation requires the information of previous element during the analysis so that it can use in the equation.
      Thank you very much for the supprt and really appretiate it.
    • Karthik Remella
      Administrator
      Hello Yes, you may wish to use the UDMIs for this. The hard part would be to identify the nodes that are of interest and obtain the data from the UDMI array. You may have to use some kind of IF statement logic (again, you will need to test this out) based on the location of the nodes that you wish to extract the data from. If the X-coordinate (for example) is greater than a certain value, then use the UDMI data. It is going to be a tricky UDF to write.
      Karthik
Viewing 7 reply threads
  • The topic ‘Using UDMI in UDF as boundary condition’ is closed to new replies.