CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

The UDF is compiled but not undergo calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2019, 04:03
Default The UDF is compiled but not undergo calculation
  #1
New Member
 
Uttar Pradesh
Join Date: Aug 2019
Posts: 5
Rep Power: 6
am2612 is on a distinguished road
Hii...
I have written a simple UDF. It has used UDS and UDM. It got successfully compiled but is not undergoing calculation. The code is stated as below....


#include "udf.h"
#include "mem.h"

DEFINE_ADJUST(adjust,d)
{
Thread *t;
cell_t c;
face_t f;
real temp;
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDSI(c,t,0) = C_MU_T(c,t);
}
end_c_loop(c,t)
}
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDMI(c,t,0)C_UDSI(c,t,1) = C_UDSI_G(c,t,0);
}
end_c_loop(c,t)
}

}

As per my experience, there is problem in assigning the accurate number of scalars and memory in the USER-DEFINED panel oof Fluent. Kindly help in sorting out the problem and any other problem if any.

Last edited by am2612; August 27, 2019 at 04:12. Reason: question is incomplete
am2612 is offline   Reply With Quote

Old   August 27, 2019, 04:22
Default
  #2
New Member
 
Uttar Pradesh
Join Date: Aug 2019
Posts: 5
Rep Power: 6
am2612 is on a distinguished road
#include "udf.h"
#include "mem.h"
enum
{GRADT};

DEFINE_ADJUST(adjust,d)
{
Thread *ct;
cell_t c;
real temp;
thread_loop_c(ct,d)
{
begin_c_loop(c,ct)
{
temp = C_T_G(c,ct)[1];
C_UDMI(c,ct,GRADT) = temp;
}
end_c_loop(c,ct)
}
}


Similar problem is with this code also. please help...
am2612 is offline   Reply With Quote

Old   August 28, 2019, 00:33
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
what problem do you have?
show explicitly errors which you have

best regards
AlexanderZ is offline   Reply With Quote

Old   August 28, 2019, 07:01
Default
  #4
New Member
 
Uttar Pradesh
Join Date: Aug 2019
Posts: 5
Rep Power: 6
am2612 is on a distinguished road
Hii Alexander...

thanks for reply.

Following are the codes and their respective errors. The codes shown the error.

1. Adjust_udm get compiled but shows error during iteration.
2. Adjust_uds does not get compiled.

Regards
Aishwarya
Attached Files
File Type: txt adjust_udm.txt (248 Bytes, 2 views)
File Type: txt adjust_uds.txt (386 Bytes, 1 views)
File Type: txt error_adjust_uds.txt (937 Bytes, 2 views)
File Type: txt error_adjust_udm_iteration.txt (319 Bytes, 1 views)
am2612 is offline   Reply With Quote

Old   August 28, 2019, 23:42
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
#include "udf.h"
#include "mem.h"
enum
{GRADT};

DEFINE_ADJUST(adjust_udm,d)
{
Thread *ct;
cell_t c;
real temp;
thread_loop_c(ct,d)
{
begin_c_loop(c,ct)
{
temp = C_T_G(c,ct)[1];
C_UDMI(c,ct,GRADT) = temp;
}
end_c_loop(c,ct)
}
}

DEFINE_ADJUST(adjust_uds,d)
{
Thread *t;
cell_t c;
face_t f;
real temp;
thread_loop_c(t,d)
{
    begin_c_loop(c,t)
    {
        C_UDSI(c,t,0) = C_MU_T(c,t);
    }
    end_c_loop(c,t)
}
thread_loop_c(t,d)
{
    begin_c_loop(c,t)
    {
        C_UDMI(c,t,1) = C_UDSI_G(c,t,0)[0];
		C_UDMI(c,t,2) = C_UDSI_G(c,t,0)[1];
		C_UDMI(c,t,3) = C_UDSI_G(c,t,0)[2];
    }
    end_c_loop(c,t)
}

}
fluent GUI -> user-defined -> memory -> ud memory locations -> 4
fluent GUI -> user-defined -> scalars -> uds -> 1

best regards
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viscosity UDF works when interpreted, Doesn't when compiled? bloodflow Fluent UDF and Scheme Programming 4 April 11, 2019 09:06
UDF compiled and loaded but not available Easyeight Fluent UDF and Scheme Programming 7 June 28, 2018 11:54
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Help! Compiled UDF problem 4 Wave tank tutorial Shane FLUENT 1 September 3, 2010 02:32
difference between udf compiled and udf interprete chandra sekhar FLUENT 2 April 11, 2006 00:04


All times are GMT -4. The time now is 01:08.