UDS to get the gradient
In the following UDF, the heat source, which depends on the gradient of a diffusivity, is trying to be calculated. One UDS2 is defined and updated to be the diffusivity at the end of each iteration through 'execute_at_end'. But I got error as
tx86\2ddp\fl1450s.exe 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
any idea for this problem?
DEFINE_SOURCE(energy_source, cell, thread, dS, eqn)
s_p = - NV_DOT(C_UDSI_G(cell,thread,2), C_UDSI_G(cell,thread,0));
s_p = -s_p*C_T(cell,thread)*C_UDSI_DIFF(cell,thread,0);
source = s_p;
dS[eqn] = 0.0;
for (i = 0; i < n_tec_zones; i++)
tec_zoneID = tec_solid_zone[i];
thread = Lookup_Thread(domain, tec_zoneID);
C_UDSI(cell,thread,2) = C_UDSI_DIFF(cell,thread,2);
C_UDSI(cell,thread,3) = C_UDSI_DIFF(cell,thread,2)*C_T_G(cell,thread);
I use domain = Get_Domain(1), and then it seems working even thought it's not perfect. But it's observed that the gradient of diffusivitity is not correct particularly at the two rows of cells attached with the boundaries. How to fix it?
I am also trying to use the DEFINE_EXECUTE_AT_END macro, and get the same exact "access-violation" error in Fluent. I think it is because of the UDF somehow, is this true?
Are you using UDM in your code as well? in this case, you have to first define them using Fluent user defined memory then execute your code. It'll vanish.
try using solve-set-expert text command line and when asked keep temporary solver memory from being freed enter yes.
Also allocate number of user defined memories
|All times are GMT -4. The time now is 04:08.|