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

UDF for specifying species mass fraction gradient at boundary

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2013, 05:18
Default UDF for specifying species mass fraction gradient at boundary
  #1
New Member
 
Saumitra Joshi
Join Date: Dec 2012
Posts: 14
Rep Power: 13
Zaphod'sSecondHead is on a distinguished road
Dear Members,

Pardon me, I am a complete newbie in the UDF sector.

I am modeling two-component purely diffusive species transport. At the boundary, I wish to specify the condition: del.C = 0, that is, the gradient of concentration at exit is zero. I used Mass Fraction as a measure of concentration.

UDF Logic:

1. Create a UDS, say UDS1, and store in it the value of mass fraction.
2. Create another UDS, say UDS2, and store in it the gradient of UDS1.
3. At boundary, specify the value of UDS2 to be zero.

I created the following UDF:
__________________________________________________ __________
#include "udf.h"

DEFINE_PROFILE(conc_grad, t, i)
{
cell_t c;
Thread *f_thread;
Domain *domain;

domain = Get_Domain(1);

thread_loop_c (f_thread, domain)
{
begin_c_loop (c, t)
{
C_UDSI(c, t, 0) = C_YI(c, t, i); /*First UDS*/
C_UDSI(c, t, 1) = NV_MAG(C_UDSI_G(f, t, 0)); /*Second UDS*/
}
end_c_loop (c, t)
}

}
__________________________________________________ _____________
After successfully interpreting the file, I set the exit boundary as "Outflow", and in the "Boundary Conditions -> Edit -> UDS" tab, specify the value as "udf conf_grad" in the drop-down menu.

After clicking OK, I get the ACCESS VIOLATION error.

I really do not know what the problem is. Could someone help me out please?

Thanks in advance.
Zaphod'sSecondHead is offline   Reply With Quote

Old   March 14, 2020, 06:12
Default
  #2
Senior Member
 
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6
mahdi-united is on a distinguished road
Quote:
Originally Posted by Zaphod'sSecondHead View Post
Dear Members,

Pardon me, I am a complete newbie in the UDF sector.

I am modeling two-component purely diffusive species transport. At the boundary, I wish to specify the condition: del.C = 0, that is, the gradient of concentration at exit is zero. I used Mass Fraction as a measure of concentration.

UDF Logic:

1. Create a UDS, say UDS1, and store in it the value of mass fraction.
2. Create another UDS, say UDS2, and store in it the gradient of UDS1.
3. At boundary, specify the value of UDS2 to be zero.

I created the following UDF:
__________________________________________________ __________
#include "udf.h"

DEFINE_PROFILE(conc_grad, t, i)
{
cell_t c;
Thread *f_thread;
Domain *domain;

domain = Get_Domain(1);

thread_loop_c (f_thread, domain)
{
begin_c_loop (c, t)
{
C_UDSI(c, t, 0) = C_YI(c, t, i); /*First UDS*/
C_UDSI(c, t, 1) = NV_MAG(C_UDSI_G(f, t, 0)); /*Second UDS*/
}
end_c_loop (c, t)
}

}
__________________________________________________ _____________
After successfully interpreting the file, I set the exit boundary as "Outflow", and in the "Boundary Conditions -> Edit -> UDS" tab, specify the value as "udf conf_grad" in the drop-down menu.

After clicking OK, I get the ACCESS VIOLATION error.

I really do not know what the problem is. Could someone help me out please?

Thanks in advance.
hi

how to store the species mass fraction gradients in fluent?
what is the its command?
mahdi-united is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 02:53
Radiation interface hinca CFX 15 January 26, 2014 17:11
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 17:15
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 21:14
mass fraction of species Ahmed FLUENT 0 April 18, 2007 11:57


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