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

Assigning source terms in user defined memory which is located at the interface?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2018, 09:06
Default Assigning source terms in user defined memory which is located at the interface?
  #1
Senior Member
 
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 10
vidyadhar is on a distinguished road
Hi,


I am trying to store Source term in UDM (user defined memory) in locations where the volume fraction of secondary phase lies between 0 and 1, i.e., at the interface. (volume fraction =1 corresponds to secondary phase and 0 corresponds to primary phase)


/*if (NULL != THREAD_STORAGE(cell_thread,SV_VOF_G))*/
if(NNULLP(THREAD_STORAGE(cell_thread,SV_VOF_G)))
{
mag = NV_MAG(C_VOF_G(cell,cell_thread));
printf("VOF_mag= %f\n",mag);
if ((NV_MAG(C_VOF_G(cell,cell_thread)))>0)
{
source=2.; C_UDMI(cell,cell_thread,0) = source;
printf("source= %g\n",source);
}
else
{
source=0;

printf("source= %g\n",source);
}
}


But, what I observed is that the commands inside the if-else conditioner is not getting executed AND user defined memory in the entire domain is assigned a value of zero.


If I remove the if(NNULLP(THREAD_STORAGE(cell_thread,SV_VOF_G))) statement it results in segmentation fault. From the forums, I partially understood that C_VOF_G data is freed up in memory and should not be allowed to do so by using text user-interface commnad: /solve/set/expert



I request any one to help me in this regard.


Thanks in advance!
vidyadhar
vidyadhar 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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 17:01.