|
[Sponsors] |
April 11, 2014, 03:11 |
how to convert c file into udf
|
#1 |
New Member
N.Ramchander
Join Date: Apr 2014
Posts: 6
Rep Power: 12 |
hi,
i have a C file and want to change into udf file,so that i want to use it in fluent .please give some suggestions how to change it. C file: #include<stdio.h> #include<conio.h> int main() { int x=0,temp=0,t; printf("enter t value"); scanf("%d",t); if(t>=90 && t<=180); { x=t-90; temp=1533-x*7; printf("temperature %d",temp); } else { printf("tempearture you given not satisfy %d",temp); } getch(); } |
|
April 11, 2014, 08:23 |
|
#2 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
Be more specific; is it to apply as a profile?
your program requests input values given by user.. What is t?time, space?? |
|
April 11, 2014, 10:14 |
convert c file to udf
|
#3 |
New Member
N.Ramchander
Join Date: Apr 2014
Posts: 6
Rep Power: 12 |
"t" represents angle
as the t value changing from 90 to 180, temperature varies as mathematical form like (1533-x*7), when t=90 then x=0, when t=91 then x=1, and so on....... here as the t (angle) changes from 90 to 180 the temperature decreases from 1533 to 903. |
|
April 11, 2014, 10:19 |
|
#4 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
post a picture of your domain with sizes, describe your case problem and if you want to use the udf as a boundary condition.
|
|
April 17, 2014, 04:06 |
|
#5 |
New Member
Jackson Sim
Join Date: Apr 2014
Posts: 7
Rep Power: 12 |
If your question is how you can convert the c file into udf for fluent, you can either interpret or compiled it. For me, i personally prefer the latter.
Go to Define-->Function-->Compiled Add the c file into the box on the left, highlight it and click "build". A list of information will start loading at the bottom screen of your mesh. Look out for words with "error" or "warning", there are lines stated where the error occurs. Do correct them and "build" the c file again. Once all the errors have been cleared, load the ::libudf file |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 03:30 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 01:22 |
patch error OF v2.2.2 mac | hewei | OpenFOAM Installation | 4 | November 30, 2013 16:55 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 13:59 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |