CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

convert C porogram to UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2016, 08:02
Default convert C porogram to UDF
  #1
New Member
 
mohamed
Join Date: Jul 2016
Posts: 1
Rep Power: 0
bouazza is on a distinguished road
Hello all,
I am trying to write my C program Of the form UDF and import them as a source term
the program calculates the electric force of a wire subjected to the high tension
How do I declare functions and call them
an example

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double c,a,b;
void f1()
{
a=2;
}

void f2()
{
b=5;
}

int main()
{
f1();
f2();
c=a+b;
printf("c=%e ",c);
}

Help pls! :P
bouazza is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent Radiation/porous media Schmitt pierre-Louis FLUENT 26 September 1, 2016 10:29
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
UDF programming fullmonty FLUENT 5 June 30, 2011 02:40
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 13:16
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 14:31.