CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Element coordinates for momentum source model (https://www.cfd-online.com/Forums/cfx/24624-element-coordinates-momentum-source-model.html)

CFDworker October 5, 2007 07:29

Element coordinates for momentum source model
 
Hi all,

I have some questions for CFX-10. I am working on a momentum source model, where amongst others, the momentum sources are dependent on the radial extent (dr) of the elements.

I am making the momentum source in fortran, and I want to make a User CEL function. I guess the functions USER_CALC_INFO and USER_GET_MESHDATA should be able do do the job, but I don't think there is some real examples of how to implement them in a User CEL function in the CFX manual.

It might be simple for those who are more into it, and they might also argue that it is well documented in the manual, but if anyone has a small example of how to calculate dr or retrieving the coordinates I want, it would be greatly appreciated:)

Johnson October 5, 2007 10:46

Re: Element coordinates for momentum source model
 
You don't need to use USER_CALC_INFO or USER_GET_MESHDATA to do this. Simply pass your variable/expression (dr) as an argument to the function, and it will be available in the ARGS() array in the fortran routine.

See the example on setting a user momentum source (MomentumSource1.F), where X and Y are passed as arguments and used to set the source.

Johnson

CFDworker October 10, 2007 08:21

Re: Element coordinates for momentum source model
 
Thank you Johnson,

At first I was kind of looking after the vertex coordinates of the elements, and from these calculate dy and dz of the elements (and afterwards dr). But I don't think I am skilled enough into the data-structure in user Fortran.

Consequently I am using a method much like you suggested to calculate volume sources as a function of the centre of the coordinate centre of the elements

Regards CFDworker

CycLone October 10, 2007 11:05

Re: Element coordinates for momentum source model
 
Why do you need the topology at all?


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