CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   How to add a UDF to a compiled UDF library (http://www.cfd-online.com/Forums/fluent/33377-how-add-udf-compiled-udf-library.html)

kim April 2, 2004 09:02

How to add a UDF to a compiled UDF library
 
Hi,

I want to know if it is possible to add own UDF to a exist compiled UDF library which has no source code.

For example, FLUENT6.1 has provided MHD module that is a kind of UDF. In this library, the UDF, mhd_dpm_force, has been provided as the body force of the particle in the electromagnetic filed. However, I want to use some coefficient, say co0, to multiple this body force as:

co0*mhd_dpm_force.

I can use UDF to define some function. However, How can I combine the UDF defined by me to the MHD module which is provided FLUENT as UDF. Of course, FLUENT does not provide any source file of UDF about MHD.

I cheked the MHD1.0 under addons fold of Fluent.Inc and found there are some libudf.so file. If these files are object files, it may be possible to re-compile my source code with those object file. Is it right ?

Does any body has such kind of expereince? My OS is LINUX red hat.

Thanks.

KIM

Benny April 4, 2004 10:07

Re: How to add a UDF to a compiled UDF library
 
Hi KIM,

I also shared the similar experience with you, and I want to amend the libudf.dll (in Windows), but I found it's too difficlut to so do.

amir.mofakham October 26, 2011 09:37

Hi every one.
I want to define a boundary condition of a MHD problem by use of UDF. In the section UDS of the boundary I select the specified flux for the boundary and then in user-Define Scalar Boundary Value I select the udf which was interpreted. When I start the iteration following error is appeared!

Error: phi_boundary: Invalid electric potential field boundary
Error Object: ()

In the UDF as u see I write a simple commend:

#include "udf.h"
DEFINE_PROFILE(Electrical_Potential,t,i)
{

face_t f;
begin_f_loop(f,t)
{
F_UDSI(f,t,0)=10;
}
end_f_loop(f,t)


}
Thanks in advance.

gearboy October 26, 2011 22:38

Quote:

Originally Posted by kim
;111558
Hi,

I want to know if it is possible to add own UDF to a exist compiled UDF library which has no source code.

For example, FLUENT6.1 has provided MHD module that is a kind of UDF. In this library, the UDF, mhd_dpm_force, has been provided as the body force of the particle in the electromagnetic filed. However, I want to use some coefficient, say co0, to multiple this body force as:

co0*mhd_dpm_force.

I can use UDF to define some function. However, How can I combine the UDF defined by me to the MHD module which is provided FLUENT as UDF. Of course, FLUENT does not provide any source file of UDF about MHD.

I cheked the MHD1.0 under addons fold of Fluent.Inc and found there are some libudf.so file. If these files are object files, it may be possible to re-compile my source code with those object file. Is it right ?

Does any body has such kind of expereince? My OS is LINUX red hat.

Thanks.

KIM

DLL is a kind of binary code recognized by computer only. It is difficult to be read by Human. If you have some cracking knowledge, maybe you can disassembly it into assembly language and edit it using ultra-edit or winhex, etc.


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