|
[Sponsors] |
February 20, 2008, 10:37 |
DPM #include "filename" ?
|
#1 |
Guest
Posts: n/a
|
Hello everyone I am using a DPM model and using the macro
C_UDMS_CONCENTRATION to extract cell dpm concentarion However, when I compile I get the follwoing error error LNK2001: unresolved external symbol _C_UDM_CONCENTRATION which, from what I understand, essentially means that I have not included all the necessary header files. But I have includeed in my code udf.h and dpm.h files Still this problem persists Can anyone tell me what is the header file to be included for C_UDMS_CONCENTRATION macro? Thank you Sandilya |
|
February 20, 2008, 14:00 |
Re: DPM #include "filename" ?
|
#2 |
Guest
Posts: n/a
|
I searched all of the header files available in the Fluent src directory and could not find any C_UDMS string matches. Where did you find this macro? "C_UDMI" is located in mem.h, you can try including that header file.
Good luck A |
|
February 20, 2008, 14:03 |
Re: DPM #include "filename" ?
|
#3 |
Guest
Posts: n/a
|
Thank you for your response i found this macro in the fluent forums archives as macro for extracting cell dpm concentrations
I too searched but did not find reference to it but I am trying to use this macro because it seems to work as other users have said thank you Regards Sandilya |
|
February 20, 2008, 14:04 |
Re: DPM #include "filename" ?
|
#4 |
Guest
Posts: n/a
|
also try sg_mem.h
|
|
February 20, 2008, 14:07 |
Re: DPM #include "filename" ?
|
#5 |
Guest
Posts: n/a
|
And I included mem.h in my code but it still does not work
|
|
February 20, 2008, 14:21 |
Re: DPM #include "filename" ?
|
#6 |
Guest
Posts: n/a
|
you have been misinformed, the correct macro is C_DPMS_CONCENTRATION(c,t) and it is located in sg_mem.h
|
|
February 20, 2008, 14:33 |
Re: DPM #include "filename" ?
|
#7 |
Guest
Posts: n/a
|
Thank you very much. That was very helpful.
However, I have another question Can you please tell me if the following code has syntax errors in it? I am tracking droplets which have single charge on them In each cell i am trying to get the total charge due to all particles by looping over all particles in a cell and then adding the charges. This I am doing because later on I want to assign a charge distribution on droplets based on their diameters. But when I hook the adjust udf given below, fluent displays error On inspection i found that due to error c-uDMI(c,t,3) variable is not updated after the iterations before error while the earlier memory variables 0,1,2 are updated Hence the error is just above the UDM 3 in the code Can you tell me if my looping over all particles in the cell as shown below is syntactically wrong? DEFINE_ADJUST(electric_field, d) { Thread *t,*tf; cell_t c; face_t f; double pc[ND_ND]; double mp; /* mass of particle */ int Z; /* charge state of particle */ double M; Particle *pi; thread_loop_c(t, d) { if (! SV_ALLOCATED_P(t,SV_UDSI_G(0))) return; if (FLUID_THREAD_P(t)) { begin_c_loop_all (c,t) { C_UDMI(c,t,0) = -C_UDSI_G(c,t,0)[0]; /* [V/m] Ex */ C_UDMI(c,t,1) = -C_UDSI_G(c,t,0)[1]; /* [V/m] Ey */ C_UDMI(c,t,2) = NV_MAG(C_UDSI_G(c,t,0)); /* [V/m] E */ mp=0; Z=0; /* Loop over particles in cell*/ begin_particle_cell_loop(pi,c,t) { /*For each particle Z and m is extracted*/ /*M = Summation of masses of all charges*/ /* M += pi->state.mass; */ /* Summation of charges - alll are unit charges*/ Z = Z + 1; } end_particle_cell_loop(pi,c,t) C_UDMI(c,t,3) = (1/C_VOLUME(c,t)) * ((double)Z * qe); /* [Cu/m^3] rhoe */ C_UDMI(c,t,4) = C_UDMI(c,t,3)*C_UDMI(c,t,0); /* [N/m^3] Fx */ C_UDMI(c,t,5) = C_UDMI(c,t,3)*C_UDMI(c,t,1); /* [N/m^3] Fy */ } end_c_loop_all (c,t) } } } |
|
February 20, 2008, 16:14 |
Re: DPM #include "filename" ?
|
#8 |
Guest
Posts: n/a
|
can you provide the error message you are getting?
|
|
February 20, 2008, 16:28 |
Re: DPM #include "filename" ?
|
#9 |
Guest
Posts: n/a
|
when I hook the DEFINE_ADJUST and start the simulation I get the following error
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: () |
|
February 21, 2008, 12:30 |
Re: DPM #include "filename" ?
|
#10 |
Guest
Posts: n/a
|
Sorry, I can't see anything wrong with your UDF, however I know that an Access violation would not be a consequence of incorrect syntax. I think the problem is that you are trying to access particle data with the Define Adjust macro wich does not have any pointer to a tracked particle passed to it. I would try to redesign the UDF with on the model-specific discrete phase macros such as DEFINE_DPM_SCALAR_UPDATE..
regards A |
|
February 4, 2010, 01:01 |
Code of Concentration in each cell
|
#11 | |
New Member
Gloria
Join Date: Feb 2010
Posts: 16
Rep Power: 16 |
Could you please help me in similar problem?
I inject particles using UDF of Scalars. I need to get the particle concentration in each cell. But I need one-way coupling for particle and air, so I can not check the "Interaction with continuous phase". Then C_DPMS_CONCENTRATION(c,t) won't work. Is there C_CONCENTRATION(c,t) or similar code that I can use. I have to get the concentration code, because it is needed in the function of source term. Thanks for taking your time! Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam install script Error during paraFoam installation | SePe | OpenFOAM Installation | 10 | June 19, 2010 16:15 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 08:21 |
OpenFOAM15 paraFoam bug | koen | OpenFOAM Bugs | 19 | June 30, 2009 11:46 |