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

RP_Get_List_Length: Unable to get length

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2023, 04:46
Default RP_Get_List_Length: Unable to get length
  #1
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
Hi,
I defined a list in TUI using the command (rp-var-define 'my-id-list '(1,2,3) 'list #f). I then tested it in UDF using the following code:
Quote:
#include"udf.h"
#include"var.h"

DEFINE_ON_DEMAND(test)
{
int n;
int i=1;
n=RP_Get_List_Length("my-id-list");
Message0("the length of list:%d",n);
}
but it went wrong
Quote:
RP_Get_List_Length: Unable to get length of my-id-list.
. I don't know why
lbj007 is offline   Reply With Quote

Old   April 29, 2023, 05:09
Default
  #2
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
I found the reason, I forgot to parallelize the code. So I wonder after which version it doesn 't need to be parallelized
lbj007 is offline   Reply With Quote

Old   April 29, 2023, 09:23
Default
  #3
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
another question:
In Version 2023R1, it shows "the length of list:0". But in Version 19.2, it is normal by showing "the length of list:3". This really puzzles me.
lbj007 is offline   Reply With Quote

Old   April 30, 2023, 08:33
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
probably, length =0 is wrong, isn't it?
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   April 30, 2023, 09:15
Default
  #5
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
probably, length =0 is wrong, isn't it?
Yes,it is wrong. In Fluent 19.2, the UDF is able to correctly recognize the list defined by RP. However, in the 2023R1 version, it can not recognize the list correctly, but other RP variables such as a single variable of real type can be recognized.
lbj007 is offline   Reply With Quote

Reply

Tags
rp variable, scheme, udf


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
SST model unable to predict reattachment length correctly Ashkan Kashani CFX 6 December 6, 2022 09:00
Fluent Parallelization Problem After AC Power Dropped pawl Hardware 5 November 13, 2016 06:08
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 09:18
backwardFacingStep: unable to get the correct reattachment length snowgetu OpenFOAM Running, Solving & CFD 1 April 22, 2015 02:03
[Commercial meshers] ST_Malloc: out of memory.malloc_storage: unable to malloc Velocity SA, cfdproject OpenFOAM Meshing & Mesh Conversion 0 April 14, 2009 15:45


All times are GMT -4. The time now is 20:24.