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

structure reference not implemented?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Per_Holmgren

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2019, 05:03
Default structure reference not implemented?
  #1
New Member
 
Västerbotten
Join Date: Sep 2016
Posts: 23
Rep Power: 9
Per_Holmgren is on a distinguished road
Hi. Simple question.

I'm trying to interpret my UDFs, and to make things simple I'll just copy Example 2 from:
http://www.afs.enea.it/project/neptu...udf/node46.htm.

It looks like this. What do I need to do to implement it in my model?

#include "udf.h"

DEFINE_PROPERTY(mass_wtd_k,c,t)
{
real sum = 0.; int i;
Material *sp;
real ktc;
Property *prop;
mixture_species_loop(THREAD_MATERIAL(t),sp,i)
{
prop = (MATERIAL_PROPERTY(sp));
ktc = generic_property(c,t,prop,PROP_ktc,C_T(c,t));
sum += C_YI(c,t,i)*ktc;
}
return sum;
}

When I try to interpret it like I usually do I get the error "structure reference not implemented" on the mixture_species_loop line.
What have I missed to be able to interpret Example 2?
As it's the example code, there is something obvious I'm missing.

If I instead try to use the compiler I just get a bunch of error messages about it not being compiled for parallel use and that the system can't find the file specified.

Help!
Per_Holmgren is offline   Reply With Quote

Old   October 15, 2019, 07:17
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
I've code above with no errors
__________________
best regards


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

Old   October 15, 2019, 07:22
Default
  #3
New Member
 
Västerbotten
Join Date: Sep 2016
Posts: 23
Rep Power: 9
Per_Holmgren is on a distinguished road
Thanks for the reply!
The clue was in the error message. I run fluent in x64 parallel mode, and to be able to compile just about anything I have to open fluent via the Visual Studios x64 command prompt.

Otherwise the compiler can't find the library files.

Compile Fluent UDF with Windows 10
Pedro A likes this.
Per_Holmgren 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
FLUID_THREAD_P(t); structure reference not implemented. fersim Fluent UDF and Scheme Programming 0 June 20, 2017 06:09
-Xlinker --add-needed -Xlinker --no-as-needed NH1994 OpenFOAM Programming & Development 7 December 31, 2014 10:24
OpenFOAM 1.6 ext - Compilation errors - Fedora 17(32bit) toolpost OpenFOAM Installation 15 September 21, 2012 09:38
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
Compiling new Solver with wmake lin123 OpenFOAM 3 April 13, 2010 14:18


All times are GMT -4. The time now is 07:40.