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

error in C_T() macro....

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2013, 12:34
Default error in C_T() macro....
  #1
Member
 
Join Date: Jul 2012
Posts: 48
Rep Power: 13
Abhya is on a distinguished road
hi ..
In my UDF I need to defien a source term in a porous zone...for definig this source term i need the vel, temp, etc at cells prior to this porous zone (cells within a certain distance limit) ..
for this I've written an udf ( using define_on_demand macro)which makes a list of all such cells - their x,y coordinates, cell id ,thread id
(these are the cells which are of my interest and which lie prior to the porous zone ..)
then in the porous zone "DEFINE_SOURCE" macro I read this text file 1line=1cell at at time .. i then convert the T_id(integer to the pointer using Look_up_thread and pass this as variable to C_T
as follows:

T_por_in_calc1=T_por_in_calc1+C_T(c_id,t_pointer);

I get and error here "segmentation violation" .. complied properly bu while running i get this error ... ..
Is passing the pointers the way i did to C-T ok 9escp because it the define source is in a thread other than Im using the thread for C_T .. is any other way out?
Abhya is offline   Reply With Quote

Old   March 22, 2013, 09:03
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
I think that the error is not with C_T. Can you post your UDF?
vasava is offline   Reply With Quote

Old   March 22, 2013, 09:14
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Can you try this and see if it works.

1. Initialize and run simulation for few iterations (e.g. 5) WITHOUT hooking the UDF.
2. Hook the UDF and then run simulation.
vasava is offline   Reply With Quote

Old   March 22, 2013, 11:24
Default
  #4
Member
 
Join Date: Jul 2012
Posts: 48
Rep Power: 13
Abhya is on a distinguished road
Quote:
Originally Posted by vasava View Post
Can you try this and see if it works.

1. Initialize and run simulation for few iterations (e.g. 5) WITHOUT hooking the UDF.
2. Hook the UDF and then run simulation.


Hi thanks .. its working now .
Its was a v silly mistake .. I had forgotten to set the energy equation on in models panel . I was actually proceeding from simpler non-thermal case to thermal variation case.. and in the "rut" forgot to turn it on . its working now
Abhya is offline   Reply With Quote

Old   August 1, 2021, 09:33
Default
  #5
New Member
 
tyehuo
Join Date: Nov 2019
Posts: 5
Rep Power: 6
tyehuo is on a distinguished road
Quote:
Originally Posted by Abhya View Post
Hi thanks .. its working now .
Its was a v silly mistake .. I had forgotten to set the energy equation on in models panel . I was actually proceeding from simpler non-thermal case to thermal variation case.. and in the "rut" forgot to turn it on . its working now
aaaaaaaaaaa!!! I made the same stupid mistake. fuck /
tyehuo 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
StarCCM+ Command line options and Macro execution isidp STAR-CCM+ 8 January 29, 2013 05:00
Run macro for Multiple file furione STAR-CCM+ 6 November 28, 2011 14:54
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 04:18
Macro problem cfddummy Siemens 1 April 9, 2007 12:37
Call a macro from a macro Flav Siemens 2 July 1, 2004 05:42


All times are GMT -4. The time now is 14:04.