CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDS-UDF problem (https://www.cfd-online.com/Forums/fluent/30561-uds-udf-problem.html)

Daniel Persson November 22, 2002 09:23

UDS-UDF problem
 
Hi,

I'm solving a problem involving magnetic fields and magnetic forces. Now I've gotten a data file containing the volume forces in a number of points. What I'd like to do is read these data into Fluent so that I can use them as a momentum source term. One solution I've been recommended to use the Interpolating function to read the data to a UDS but I'm having problems understanding the syntax for the interpolation file.

This is what I've understod so far (written line by line):

2 ( version for Interpolation file-func )

2 ( Dimensions ,2D in my case )

34800 ( Number of points )

2 ( Number of fields, I guess two in my case. Force in x-direction and force in y-direction )

UDS1?? ( The field names should be written here, but how do I write this?? )

UDS2??

-0.068062?? ( Here are the coordinates of the points, but is it first x-coord then y-coord or is it alternating x and y?? )

after this the field values should be specified but is it in alternating or consecutive order??

And after I've used this Interpolating function how do I get it to be a Momentum source term?? I assume that I hav'to write a UDF file but what commands should I use to get the interpolated values from the UDSs??

Greetful for all answers or suggestions.

ravi varma November 23, 2002 13:24

Re: UDS-UDF problem
 
one thing you can do after the interpolation function is defined is to store the values as "extern" variables. store all your "extern" variables in a seperate file - say udf_extern.h then define a source macro for momentum whereby you can recall the extern variables "#include udf_extern.h" this example on using this method is shown in UDF manual 2.5.4

mahdi saniee nezhad November 24, 2002 00:44

Re: UDS-UDF problem
 
Dear sir I have a problem with this title. If it's possible for you please send me your received responses. Very thanks for your attention to my request. With the best regards. Mahdi saniee nezhad



All times are GMT -4. The time now is 03:33.