|
[Sponsors] |
specified shear at wall - temperature gradient - UDF - access violation error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2010, 13:04 |
specified shear at wall - temperature gradient - UDF - access violation error
|
#1 |
New Member
Deb
Join Date: Jul 2010
Posts: 1
Rep Power: 0 |
Hi
A simple rectangular geometry. Have temp gradient in domain as walls at different temperature. Need to specify shear at wall. The specified shear depends on temperature gradient. Wrote udf to specify it. the udf uses the x- and y- components of temperature gradient to calculate shear stress. Getting 'ACCESS VIOLATION ERROR' NOTE: [1] Tried to even run a few steps and then hook the udf, still error. [2] runs ok if I use C_T i.e. it can access the temp but cannot access the gradient!!! ANY HELP WOULD BE VERY MUCH APPRECIATED Doing in Fluent The UDF is as follows: #include "udf.h" #define SurfTenGrad -0.43e-3 /*temperature coefficient of surface tension in N/(m-K)*/ /*Specifying x-component of shear on top surface*/ DEFINE_PROFILE(xShearStress,t,j) { cell_t c; begin_c_loop(c,t) { /*C_T_G(c,t)[0] = returns x-component of cell temp gradient vector*/ C_PROFILE(c,t,j) = SurfTenGrad*C_T_G(c,t)[0]; } end_c_loop(c,t) } /*Specifying y-component of shear on top surface*/ DEFINE_PROFILE(yShearStress,t,l) { cell_t c; begin_c_loop(c,t) { /*C_T_G(c,t)[1] = returns y-component of cell temp gradient vector*/ C_PROFILE(c,t,l) = SurfTenGrad*C_T_G(c,t)[0]; } end_c_loop(c,t) } |
|
January 18, 2011, 21:41 |
|
#2 |
New Member
anonymous
Join Date: Jan 2011
Posts: 12
Rep Power: 15 |
m facin similar problem .. if u got thru thn plz help me out
|
|
January 21, 2011, 13:27 |
|
#3 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
Sorry but i don't understand why are you using
C_PROFILE instead of F_PROFILE. I think that this udf is for boundary faces and not for boundary cells Nikolopoulos Aristeidis |
|
February 2, 2011, 05:24 |
|
#4 |
New Member
anonymous
Join Date: Jan 2011
Posts: 12
Rep Power: 15 |
i am getting access violation if i try to use C_T_G(c,t) ..if i dont use it then everything works fine
|
|
February 2, 2011, 06:04 |
|
#5 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
I think your problem and solution is discribed in UDF manual:
"Table 3.2.9 shows a list of cell gradient vector macros. Note that gradient variables are available only when the equation for that variable is being solved. For example, if you are defining a source term for energy, your UDF can access the cell temperature gradient (using C_T_G), but it cannot get access to the x-velocity gradient (using C_U_G). The reason for this is that the solver continually removes data from memory that it doesn't need. In order to retain the gradient data (when you want to set up user-defined scalar transport equations, for example), you can prevent the solver from freeing up memory by issuing the text command solve/set/expert and then answering yes to the question Keep temporary solver memory from being freed?. Note that when you do this, all of the gradient data is retained, but the calculation requires more memory to run. " |
|
February 2, 2011, 23:19 |
|
#6 |
New Member
anonymous
Join Date: Jan 2011
Posts: 12
Rep Power: 15 |
hi Nikolopoulos,
thnx a lot for ur prompt responses i later found that on other threads and things r wrkin fine now... but m facing another problem - m gettin floating point error wen i am trying to display any profile..the udf compiles well widout givin ne error..it iterates too givin a correct indicative range of soln but wen i try to get a "display" its gives an FPE widout givin ne display ..is it a problem with my graphics card. cheers |
|
February 3, 2011, 02:39 |
|
#7 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
I don't think it is a problem of graphics.
Can you post your new code that is compiled? |
|
May 12, 2012, 19:23 |
hi
|
#8 |
New Member
moon
Join Date: Feb 2012
Posts: 26
Rep Power: 14 |
i have the same problem ,also with using solve/set/expert and chose yes in the question
|
|
September 8, 2014, 05:24 |
Solution
|
#9 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
Hi calvin,
I know this is a old thread, but it would be very nice if you would share your solution or post the link where you found the solution. Thank you |
|
September 18, 2014, 08:29 |
|
#10 |
New Member
sarighulikhan
Join Date: Mar 2014
Posts: 15
Rep Power: 12 |
becouse u didnt include its header file
mem.h |
|
Tags |
access violation error, specified shear at wall, surface tension, temperature gradient, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wall shear stress gradient udf | Andrew | FLUENT | 3 | April 4, 2018 02:36 |
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." | sega | OpenFOAM Community Contributions | 12 | February 17, 2010 10:30 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
Error (ACCESS VIOLATION) with UDF | Ale | FLUENT | 2 | May 28, 2002 03:50 |