|
[Sponsors] |
February 26, 2016, 08:43 |
urgently need help to write UDF
|
#1 |
New Member
Join Date: Dec 2015
Posts: 8
Rep Power: 11 |
I have a periodic domain of 0.64x0.64 m with 512x512 grid points. I am simulating gas solid flow. I need to gather data of solid velocity,gas velocity slip velocity and solid volume of fraction in each cell after every time step. For a given solid vof say 0.1 ,calculating the solid vof in each cell in the full domain,when the solid vof fall in like vof-0.1 ,save the current time,solid vof,solid velocity and gas velocity in a file.. Any one can help me in this issue?I have a strict deadline of a week to finish this ?
|
|
February 29, 2016, 20:47 |
|
#2 | ||
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Let's try to break your question up into sections:
Quote:
Quote:
A conditional if statement could be employed within a DEFINE_ADJUST macro (called at each time step) where the VOF of cells are checked. Then, output the data as usual. |
|||
March 1, 2016, 02:56 |
|
#3 |
New Member
Join Date: Dec 2015
Posts: 8
Rep Power: 11 |
. Thank you so much "e" for your response. I am using multiphase eulerian model and then i chose eulerian model in Fluent not VOF....I am in a learning phase to write a udf but it will probably take some time. How can i save this data using post cfd??And can you give me a sample udf ??I am finished with the simulation and now i need this data....probably i have to run this simulation again with the udf. right?
|
|
March 1, 2016, 05:26 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Have a read of this tutorial starting from "Setting Up Data Export to Create Animation". You may also want to create an animation, but otherwise simply save plots of your volume fractions etc.
Note: this method is for every n number of time steps (rather than on a condition of cells reaching a VOF threshold). If you only want to save the data when the volume fractions are at a threshold (or similar condition), then you may need to write a Scheme script with TUIs and couple that with a UDF (not as straightforward). It's still unclear what you're after overall. If saving the data every few time steps is not what you want, then try to explain again when you want to save this data. |
|
March 9, 2016, 03:34 |
|
#5 |
New Member
Join Date: Dec 2015
Posts: 8
Rep Power: 11 |
Thank you e for your response..Sorry i am in China and sometimes i cant acess this site without vpn. What i want is to gather the data according to the solid volume of fraction in each cell. As solid vof will not be equal in every location even at the same instant of time. So i will divide the allowed value of solid vof from 0-0.65 into 1300 bins. So that now every bin has a window of 0.0005. Now i want my udf to calculate the solid vof into bins with in this range. Like less than 0.0005 vof,,into one bin. Then greater than 0.0005 but less than 2(0.0005) into next bin,,so on and so forth. This udf should also tell the corresponding value of solid velocity,gas velocity and current time. Can you help me with that?
|
|
March 11, 2016, 01:55 |
'e' Help Me also
|
#6 |
New Member
Pradip
Join Date: Jan 2016
Location: Mumbai
Posts: 13
Rep Power: 10 |
Hello e,
I have similar problem as above I have gone through above mentioned tutorial of simcafe but I have 4 with my project and 2 problems with this tutorial. Project doubt: 1. I am doing flapping wing analysis with udf for Wing as rigid body and surrounding as deforming body. Which gives results of Coeff. of Lift and drag. But further I required some expression(such as Coeff of thrust and Efficiency of propulsion) to be evaluated at time steps and plot graph of the same.How can I do that from fluent to cfx pre/ cfd post? Can we do write expression for any formula in Fluent and graph will be plotted? 2. If I have to calculate above mentioned expressions which file format I have to save results of Fluent. Is it possible to run udf in cfd post? because it is compiled in c compiler using Visual studio 2010 and cfx require fortran. 3. Which parameters I have to choose while exporting from Fluent? 4. Also motion can we give it to wing as rigid body in cfx pre solving? Turorial Doubt: 1. When I tried 3 times on patching they have give image but this did not happened in my solving. 2. Solution also did not come as they have explained. Thanks in Advanced. Regards Pradip. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linux commands to write udf for remote Linux nodes | saayo3 | Fluent UDF and Scheme Programming | 4 | November 1, 2017 07:14 |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF | acasas | CFD Freelancers | 1 | January 23, 2015 08:26 |
HOW to write udf for motion of piston and displacer? | mani.rajendiran | Fluent UDF and Scheme Programming | 0 | March 13, 2012 01:22 |
how to write a 3D linear temperature of UDF | venus | FLUENT | 1 | October 28, 2008 03:46 |
UDF TO WRITE OUT DATA!! | Aishwarya | FLUENT | 0 | August 12, 2004 11:11 |