CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   User Defined Functions in Star CCM+ (https://www.cfd-online.com/Forums/star-ccm/204841-user-defined-functions-star-ccm.html)

khal August 2, 2018 05:35

User Defined Functions in Star CCM+
 
Hello,

I am very new to the CFD simulation world and my task is to simulate in-tube steam condensation in horizontal tubes using star ccm+.

For the geometry and flow conditions, I am interested in, I found a paper that simulated the flow with ANSYS FLUENT, and User Defined Functions (UDF)- written in C language- have been used to enhance the standard features of the code.

My questions are: can I define UDFs and apply it to the star cmm+ solver? if it is possible, how can I do so? and in general, should I expect similar results between the FLUENT and Star ccm+?

Sorry if my questions are basic, but I looked in the Star ccm+ user guide but could not spot anything related to the UDFs. Maybe I am not using the correct Keywords (?).

Thank you

fluid23 August 3, 2018 15:30

You have a few options depending on the complexity of what you are trying to do. The most basic is under Tools > Field Function. If you right-click you can create a new user-defined function that can use an calculated field variable (p,T,rho,U, etc...), reports (force, flowrate, volume average values, etc...) and some basic logic (if/else, and/or, </>, etc..). The syntax isn't very straight forward so you will have to do some digging to figure our how to define the function you are after.

The other option is to use user-code which takes a compined code (c, c++, fortran) and executes whatever script you need. If the original C code is available and you know how to compile it, that may be the way to go but I suspect that there will be some serious compatibility issues between FLUENT/star-ccm+.

khal August 4, 2018 04:13

Thank you. It is clear for me now.
Regards.


All times are GMT -4. The time now is 21:01.