DPM #include "filename" ?
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 |
Re: DPM #include "filename" ?
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 |
Re: DPM #include "filename" ?
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 |
Re: DPM #include "filename" ?
also try sg_mem.h
|
Re: DPM #include "filename" ?
And I included mem.h in my code but it still does not work
|
Re: DPM #include "filename" ?
you have been misinformed, the correct macro is C_DPMS_CONCENTRATION(c,t) and it is located in sg_mem.h
|
Re: DPM #include "filename" ?
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) } } } |
Re: DPM #include "filename" ?
can you provide the error message you are getting?
|
Re: DPM #include "filename" ?
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: () |
Re: DPM #include "filename" ?
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 |
Code of Concentration in each cell
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:
|
All times are GMT -4. The time now is 09:59. |