|
[Sponsors] |
trying to simulate the compression stroke inside cylinder, using UDF for injection |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 17, 2009, 05:24 |
trying to simulate the compression stroke inside cylinder, using UDF for injection
|
#1 |
New Member
Join Date: Oct 2009
Posts: 26
Rep Power: 17 |
Dear Sir/Madam
I am trying to simulate the compression stroke inside the cylinder. I need to specify a UDF for Injection from 310 degrees to 340 Degrees. I have to activate my inlet during this period. Can you please guide me in writing an UDF. I have no experience in Programming Thank you |
|
November 25, 2009, 07:57 |
|
#2 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
Check this post: http://www.cfd-online.com/Forums/flu...tml#post237366
|
|
November 25, 2009, 08:59 |
|
#3 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
dear dmoroian
i'm simulating slug flow with phase change (boiling heat transfer) in vertical tube and i need also to specify a UDF for mass and heat transfer between gas and liquid phases, would please help me |
|
November 25, 2009, 09:11 |
|
#4 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
Hi Raoudha,
Your topic is difficult, and I don't have much experience with it (mass transfer between phases). As a general answer you have to use DEFINE_SOURCE macro. |
|
November 25, 2009, 09:21 |
|
#5 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
thank you dmoroian
|
|
November 27, 2009, 11:56 |
|
#6 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
hello dmoroian
i'm trying to understand how using udf for boiling flow (horizontal boiling flow) but when compiling (define-> udf->compiled) an error msg is shown: the system cannot find the path specified (the boiling.c file was saved in the same directory) "(system "copy C:\Fluent.Inc\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\2ddp\makefile") 1 fichier(s) copi‚(s). 0 (chdir "libudf")() (chdir "ntx86\2ddp")() 'nmake' n'est pas reconnu en tant que commande interne ou externe, un programme ex‚cutable ou un fichier de commandes. 'nmake' n'est pas reconnu en tant que commande interne ou externe, un programme ex‚cutable ou un fichier de commandes. Done." what shall i do thank in advance raoudha |
|
November 28, 2009, 05:59 |
You need a compiler
|
#7 | |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
Quote:
From the message you posted above I suspect that you don't have a compiler installed on your machine. Dragos |
||
November 28, 2009, 06:35 |
|
#8 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
hi dragos
i have installed c++ but the same msg is chown, shall i use an other compiler? thankx raoudha |
|
November 28, 2009, 12:46 |
|
#9 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
I have never used fluent+udf on Windows, but Microsoft Visual C++ should be enough. Do you have it installed?
Dragos |
|
November 28, 2009, 13:20 |
|
#10 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
yes i have installed Microsoft Visual C++2008 express edition
and no change :-(( |
|
November 28, 2009, 14:51 |
|
#11 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
finally this problem is solved, i had to open fluent from Visual Studio command prompt
thank for help raoudha |
|
December 2, 2009, 01:23 |
|
#12 |
New Member
Saeed Abbasi
Join Date: Sep 2009
Location: Iran
Posts: 20
Rep Power: 17 |
some times the the nmake problem is solved, but other problems exist. It is better to counteract all problem at once:
Run the Vcvars32.bat file in the ..\BIN directory found in the installed directory under ..\MSDEV or ..\DevStudio\VC of your installed visual c++ directory. This file contains the environment variables required to run build tools from a command prompt. After that run the fluent from this command prompt...... |
|
December 2, 2009, 06:47 |
|
#13 |
New Member
raoudha
Join Date: Nov 2009
Posts: 18
Rep Power: 17 |
hello Saeed
i'll try to do it thankx |
|
December 15, 2013, 09:04 |
UDF rotation for a VAWT
|
#14 |
New Member
mangs
Join Date: Jul 2012
Posts: 2
Rep Power: 0 |
Hi,
i want to do a simulation of a vawt using UDF with "Fluent" but i have some problem. I want that the blades move only with the wind velocity. When i use a dynamic mesh, i have the message" negative volume" in "unsteady solver" but in "steady" i have solution. Someone can help me. i send also the picture of my study my udf: DEFINE_CG_MOTION(piston,dt,vel,omega,time,dtime) { Thread *t; face_t f; real NV_VEC(A); real force, dv; /* reset velocities */ NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); if (!Data_Valid_P()) return; /* get the thread pointer for which this motion is defined */ t = DT_THREAD(dt); } /* compute pressure force on body by looping through all faces */ force = 0.0; begin_f_loop(f,t) { F_AREA(A,f,t); force += F_P(f,t) * NV_MAG(A); } end_f_loop(f,t) /* compute change in velocity, i.e., dv = F * dt / mass velocity update using explicit Euler formula */ dv = dtime * force / 50.0; v_prev += dv; Message ("time = %f, x_vel = %f, force = %f\n", time, v_prev, force); /* set x-component of velocity */ vel[0] = v_prev; } Last edited by famangs; December 15, 2013 at 09:18. Reason: Fluent |
|
December 15, 2013, 12:46 |
You need to study more
|
#15 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
Hello Famangs,
I don't know what a "vawt" is, so I looked at your picture, and it seems that you have a rotating part and a static part separated by an interface. I presume that you want to move only the rotor by rotating it around an axis. The rotation will be given by a resultant pressure force. According to my view, these are the errors that you made: 1. The force should be vectorial not scalar. The summation you do, should be accurate only for a plannar surface. 2. You need to modify angular velocity (omega), not translational velocity, otherwise your rotating part will go out of its axis. These errors are mostly conceptual, so I would advise you to ask for help from your supervisor, or study more. |
|
December 16, 2013, 05:30 |
|
#16 |
New Member
mangs
Join Date: Jul 2012
Posts: 2
Rep Power: 0 |
Hello, dmoroian,
thanks for your reply, it's the first time that i use the udf. I have a lot of difficulty with it. VAWT means vertical axis wind turbine |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Earn cash] UDF For freely vibrating cylinder | Ken | FLUENT | 1 | January 1, 2011 16:27 |
Accelarating of a cylinder UDF | Ashutosh | FLUENT | 4 | August 3, 2010 07:52 |
adaptive mesh & UDF for cylinder compressor | Pedro_RZ | FLUENT | 0 | April 18, 2007 04:57 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 13:37 |
Species Mass Fraction inside UDF using PDF? | Daniel Schneider | FLUENT | 0 | September 20, 2000 07:34 |