|
[Sponsors] |
March 16, 2011, 06:05 |
|
#21 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
hi amir
when I launched fluent from visual studio x64 win64 command prompt (2010) the above problem was solved! thank you for your honesty supporting |
|
April 30, 2011, 08:02 |
|
#23 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
Dear Amir
I compiled this udf without any error. but when I run the program I get this error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: #f do you know what should I do? |
|
April 30, 2011, 16:20 |
|
#24 |
Senior Member
|
Hi Iman,
before running your problem with this UDF, you have to set the number of user variables in DPM panel. (you have used one user variable) Define->models->DPM->UDF-> set the No. of scalars to 1 |
|
May 1, 2011, 11:18 |
|
#25 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
hi amir
I did it, but it doesn't work!again I got this error. |
|
May 2, 2011, 08:25 |
|
#26 | |
Senior Member
|
Hi,
in addition to above settings, try this code: Quote:
|
||
May 2, 2011, 09:39 |
|
#27 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
hi amir
did you compile this udf?when I build it, it's ok,but when I load this udf I have this error: open_udf_library: The system cannot find the file specified. I tried to consider all above things. |
|
May 2, 2011, 16:54 |
|
#28 |
Senior Member
|
Hi,
yes of course; I also track particles with it !!! when this error appears, it means that the libudf file is not created, so notice your compiling procedure or check that in different case files. |
|
May 14, 2011, 11:11 |
|
#29 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
hi amir
this udf works for steady particle tracking, but when I want to apply it for unsteady particle tracking, after 2 or 3 iteration,I have this error again.do you know what's wrong? |
|
August 7, 2011, 07:17 |
|
#31 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
Dear amir
thanks for your support I am concerned with new case that I need to write a new UDF for Drag force, but I received several errors. Please compile this udf to see what can we do with these errors. I enclosed my udf. thank you so much. #include "udf.h" #define dp 50e-9 #define sigma_square 1.35305239e-19 #define ambpress 101325 #define Boltzmann 1.3806505e-23 #define PI 3.14159265358979323846 #define SQRT_2 1.414213566237309504880 DEFINE_DPM_DRAG(particle_drag_force,Re,p) { real drag_force,MeanFreePath,Nu,W; face_t face; cell_t cell; Thread *c_thread; Thread *f_thread; MeanFreePath=Boltzmann*F_T(face,f_thread)/( sigma_square*(F_P(face,f_thread)+ambpress)* PI*SQRT_2); Nu=MeanFreePath/dp; W=-0.1695-0.3881*(double log (double Re))+1.1722/(double sqrt (double Re))+(-0.1389)/Re+1.7637*(double exp (double (-Nu)); particle_drag_force=(double exp (double W)); return (drag_force); } |
|
August 7, 2011, 07:57 |
|
#32 |
Senior Member
|
Hi,
you were trying to set real value to string one! try this: Code:
#include "udf.h" #define dp 50e-9 #define sigma_square 1.35305239e-19 #define ambpress 101325 #define Boltzmann 1.3806505e-23 #define PI 3.14159265358979323846 #define SQRT_2 1.414213566237309504880 DEFINE_DPM_DRAG(particle_drag_force,Re,p) { real drag_force,MeanFreePath,Nu,W; face_t face; cell_t cell; Thread *c_thread; Thread *f_thread; MeanFreePath=Boltzmann*F_T(face,f_thread)/( sigma_square*(F_P(face,f_thread)+ambpress)* PI*SQRT_2); Nu=MeanFreePath/dp; W=-0.1695-0.3881*log(Re)+1.1722/sqrt(Re)+(-0.1389)/Re+1.7637*exp(-Nu); drag_force=exp(W); return (drag_force); }
__________________
Amir |
|
August 14, 2011, 03:17 |
|
#33 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
Hi Amir
I compiled this code, it has no error but it has two warnings: uninitialized local variable 'f_thread' used uninitialized local variable 'face' used but when I want to initialize my case I have ACCESS_VIOLATION error. does it relate to initialize them? thank you for your help |
|
August 14, 2011, 04:26 |
|
#34 | |
Senior Member
|
Quote:
Anyway, you have used some unreferenced parameters such as: Code:
face_t face; cell_t cell; Thread *c_thread; Thread *f_thread; If it's true to use cell values physically, first assign cell index and it's thread via these commands (and omit 2 face references): Code:
c=P_CELL(p) c_thread=P_CELL_THREAD(p) Bests,
__________________
Amir |
||
August 16, 2011, 11:22 |
|
#35 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
Dear Amir
thank you very much for your supporting every time I have two questions: 1. have you ever worked with mixture model in fluent. Can I use it for solid-liquid mixture? according to fluent tutorial, I defined a case but my results in heat transfer is overstimate. I guess maybe second phase volume fraction affect results. my total volume fraction is 1%, so, should I insert 0.01 for second phase volume fraction? 2. in DPM model, I don't get the meaning of particle flow rate, in injection tab. when we insert the number of particles, diameter and velocity of particles, what is particle flow rate?I remember one time you told me that it express the different between real particle and computational particle, when we have lots of particles. but I don't know, how compute particle flow rate. sorry for long text |
|
August 16, 2011, 12:37 |
|
#36 | ||
Senior Member
|
Quote:
Note, this is eulerian multi-phase model used for larger volume fractions. As you know, brownian motion of particles play role of diffusion; so, if you want to use eulerian method instead of lagrangian one, I recommend you to use UDS instead of mixture model which is much more simpler and without restriction of volume fraction! Here, you just need to choose proper diffusion coefficient which obtained from brownian motion concepts. But, before switching to eulerian method, note whether this model is proper for your case or not. Indeed, eulerian method is better for nano particle modelling. Quote:
__________________
Amir |
|||
August 21, 2011, 06:31 |
|
#37 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
[QUOTE=Amir;320324]I recommend you not to use mixture model for your case; it's more than that you really need
Note, this is eulerian multi-phase model used for larger volume fractions. As you know, brownian motion of particles play role of diffusion; so, if you want to use eulerian method instead of lagrangian one, I recommend you to use UDS instead of mixture model which is much more simpler and without restriction of volume fraction! Here, you just need to choose proper diffusion coefficient which obtained from brownian motion concepts. But, before switching to eulerian method, note whether this model is proper for your case or not. Indeed, eulerian method is better for nano particle modelling. Hi Amir this model is part of my project.because low volume fraction, lagrange approach is best for nano particles, but I have to use mixture model for comparison with lagrange model. I read different tutorials and it doesn't seem to be complicated!but my results are over estimate. is there any special point that I should consider?or do you think my flow is granular? Also, I didn't hear anything about UDS model. is it a part of multiphase modeling? thanks alot |
|
August 21, 2011, 06:34 |
|
#38 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
also, I know about real and computational particles in DPM. I want to know how calculate flow rate in injection particle inlet?
thank you very much. |
|
August 21, 2011, 10:35 |
|
#39 | ||
Senior Member
|
Quote:
I've done many projects concerning nano particle distribution and confidently say that UDS is the best way of modelling it because it's applicable to both low and high volume fraction; i.e., I don't agree with you that lagrangian approach is the best tool for nano particle cases! contrarily, it's the worst tool because of its bugs in computing deposition and dispersion! Note that UDS (user defined scalar) is just a scalar conservation equation which can be used to evaluate particle concentration in your case (more info in user manual), so if you want to implement eulerian method as a part of your project, you can also use UDS instead of multiphase models. Quote:
Bests,
__________________
Amir |
|||
August 23, 2011, 07:21 |
|
#40 |
Member
iman vasefi
Join Date: Aug 2010
Posts: 39
Rep Power: 16 |
Dear Amir
I read the help of fluent for UDS and unfortunately I didn't get what should I do. do I have to solve the flow for multiphase flow or single phase flow? is just enough to consider coefficient of diffusion in material tab? if you have a simple case file, it would be great if you can send me that until I know what should I do. because I didn't find a proper tutorial for this concept. thanks for your support |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for defining a body force in Singel ROtating Reference Frame | teymourj | Fluent UDF and Scheme Programming | 9 | August 18, 2016 16:33 |
UDF force on a face | enry | Fluent UDF and Scheme Programming | 10 | March 23, 2011 11:48 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
DPM with UDF - Step-by-Step Procedure???? | Prashanth | FLUENT | 3 | April 3, 2009 18:45 |
DPM drag force UDF | hedonists | FLUENT | 0 | March 12, 2003 22:10 |