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

UDF interpreted problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2019, 17:54
Default UDF interpreted problem
  #1
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 8
pianaCFD is on a distinguished road
Hello guys,


I have a quick question.
Is there a reason of why i can't use "c-structured" variables on my interpreted UDF codes? I am using a 4core parallel fluent. Interpreting, then, fluent is giving the error



' Error: ~/*.c line 43: declaration: invalid opcode pop.char '



as you can see in the attachment. In the line 43 I have the c-structured variable.
Attached Images
File Type: jpg Screenshot from 2019-03-11 10-19-48.jpg (32.8 KB, 10 views)
pianaCFD is offline   Reply With Quote

Old   March 11, 2019, 21:08
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
try to compile your code instead of interpret

best regards
AlexanderZ is offline   Reply With Quote

Old   March 14, 2019, 09:47
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Or show a little of your code, especially around line 43.


For you, "c-structured variable" seems like a normal term, but I don't understand what you mean with this, and Google does not help. Don't describe your code if you want help with it, just show it!
pakk is offline   Reply With Quote

Old   April 13, 2019, 11:04
Default
  #4
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 8
pianaCFD is on a distinguished road
Thank you for your fast answer.


The point is that I always compiled my code on a serial fluent and now I want to get the analysis faster using a parallel fluent.

I saw 2 solution:

1) Interpret the code;
2) Compile it with something like this

http://www.afs.enea.it/project/neptu...df/node230.htm
but it seems a bit complicated for me, so I wanted to interpret.


On the attachment you can see an example of a C-structured.


So I want to interpret it, but it shows that error.
Attached Images
File Type: jpg C-structured.jpg (53.1 KB, 15 views)
pianaCFD is offline   Reply With Quote

Old   April 15, 2019, 01:12
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
you've put a picture of your code here.

the thing is you don;t have to if it is too complicated for you

best regards
AlexanderZ is offline   Reply With Quote

Old   April 17, 2019, 09:57
Default
  #6
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 8
pianaCFD is on a distinguished road
I'm just asking what is the problem with that structure in a interpreted code. Is there a solution? If you try to compile just a simple code with a variable like that fluent is not working or at least on my computer is not working.

Thank you and Regards
pianaCFD is offline   Reply With Quote

Old   April 17, 2019, 10:11
Default
  #7
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you interpret c-code, not everything will work. And, apparently, structs don't work.



The solution is to compile.


If you want to do a parallel calculation, you might have to adjust your code a bit.
* Sometimes you have to change nothing.
* Usually you have to add just a few #if lines.
* Sometimes you have to change more, like in the example you gave.


You said that if you try to compile just a simple code with a variable like that fluent is not working: this just means that you made a mistake in your code. You have given us not enough information to find out what the mistake is.
pakk is offline   Reply With Quote

Old   April 17, 2019, 10:28
Default
  #8
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 8
pianaCFD is on a distinguished road
Okay then, I will try to compile and insert #if statements.
Thank you for your quick answer.


Regards.
pianaCFD 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
UDF Problem ozgur Fluent UDF and Scheme Programming 18 January 17, 2016 15:40
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 01:43
UDF using problem, error happens-heip!! Michael FLUENT 1 December 9, 2008 08:51
parallel UDF problem kerem FLUENT 2 June 20, 2006 07:56
UDF variables F1, y / problem with UDF Fabian FLUENT 6 June 2, 2003 11:22


All times are GMT -4. The time now is 16:10.