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

How to get the gradient of species mass fraction?

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

Like Tree4Likes
  • 4 Post By coglione

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2010, 12:47
Default How to get the gradient of species mass fraction?
  #1
New Member
 
Yang Xiaoguang
Join Date: Apr 2009
Posts: 24
Rep Power: 17
legendyxg is on a distinguished road
Dear my friends.

I want to get access to the gradient of species mass fractions. The manual said that the macro C_YI_G(c,t,i) can be used only in the density-based solver. To use this in the pressure-based solver, you will need to set the rpvar 'species/save-gradients? to #t. What does that means? How can I set the "rpvar"? Since I know nothing about the scheming languages, can someone give me an example of how to set the rpval in my UDFs?

Thanks a lot.
legendyxg is offline   Reply With Quote

Old   August 23, 2010, 03:19
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
Type
(rpsetvar 'species/save-gradients? #t)
in the text-console of Fluent.
(rpgetvar 'species/save-gradients?) can be used to check the current value of this variable. It should return #t (true) now.
cheers
coglione is offline   Reply With Quote

Old   August 23, 2010, 21:07
Default
  #3
New Member
 
Yang Xiaoguang
Join Date: Apr 2009
Posts: 24
Rep Power: 17
legendyxg is on a distinguished road
Thank you very much coglione!
legendyxg is offline   Reply With Quote

Old   October 22, 2016, 14:35
Default ?
  #4
New Member
 
Amor
Join Date: Oct 2015
Posts: 1
Rep Power: 0
Amor92 is on a distinguished road
Hi,

I'm new to Fluent. Can you show me how to work with these macros?
Amor92 is offline   Reply With Quote

Old   October 2, 2018, 04:35
Default Thank you very much!
  #5
New Member
 
Yunsung Park
Join Date: Sep 2018
Posts: 2
Rep Power: 0
Yunsung_Park is on a distinguished road
It was very helpful
I really appreciate your answer
Yunsung_Park is offline   Reply With Quote

Old   March 9, 2020, 17:25
Default
  #6
Senior Member
 
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6
mahdi-united is on a distinguished road
Quote:
Originally Posted by coglione View Post
Type
(rpsetvar 'species/save-gradients? #t)
in the text-console of Fluent.
(rpgetvar 'species/save-gradients?) can be used to check the current value of this variable. It should return #t (true) now.
cheers
hi i wrote a udf for getting the species mass fraction gradients by define_adjust and using the storing commands as follow:


DEFINE_ADJUST(gradient, domain)
{
Thread *t;
Thread **pt;
cell_t c;
Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,P_PHASE);
real voidx, voidy, voidz=0.0;


mp_thread_loop_c (t,domain,pt)
{
if (FLUID_THREAD_P(t) && n_udm > 0)
{
Thread *tp = pt[P_PHASE];
begin_c_loop (c,t)
{
C_UDMI(c,t,0) = C_YI_G(c,tp,0)[0];
}
end_c_loop (c,t)
}
}

}


this code compile and initialize correctly without any error
but in calculating in 1st iteration appear the message "the f1 process could not be started" and fluent crashes.
Where do you think the problem is?
mahdi-united is offline   Reply With Quote

Old   August 4, 2020, 01:34
Default
  #7
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
how to calculate gradient of species mole fraction in fluent?
scorpian is offline   Reply With Quote

Old   August 4, 2020, 01:35
Default
  #8
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
Quote:
Originally Posted by Yunsung_Park View Post
It was very helpful
I really appreciate your answer
how to calculate gradient of species mole fraction in fluent?
scorpian is offline   Reply With Quote

Old   August 4, 2020, 01:36
Default
  #9
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
Quote:
Originally Posted by coglione View Post
Type
(rpsetvar 'species/save-gradients? #t)
in the text-console of Fluent.
(rpgetvar 'species/save-gradients?) can be used to check the current value of this variable. It should return #t (true) now.
cheers
How to calculate gradient of species mole fraction in fluent?
scorpian is offline   Reply With Quote

Old   August 4, 2020, 01:38
Default
  #10
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
Quote:
Originally Posted by mahdi-united View Post
hi i wrote a udf for getting the species mass fraction gradients by define_adjust and using the storing commands as follow:


DEFINE_ADJUST(gradient, domain)
{
Thread *t;
Thread **pt;
cell_t c;
Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,P_PHASE);
real voidx, voidy, voidz=0.0;


mp_thread_loop_c (t,domain,pt)
{
if (FLUID_THREAD_P(t) && n_udm > 0)
{
Thread *tp = pt[P_PHASE];
begin_c_loop (c,t)
{
C_UDMI(c,t,0) = C_YI_G(c,tp,0)[0];
}
end_c_loop (c,t)
}
}

}


this code compile and initialize correctly without any error
but in calculating in 1st iteration appear the message "the f1 process could not be started" and fluent crashes.
Where do you think the problem is?
How to calculate the gradient of species mole fraction in fluent?
scorpian is offline   Reply With Quote

Old   August 4, 2020, 01:39
Default
  #11
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
Quote:
Originally Posted by legendyxg View Post
Dear my friends.

I want to get access to the gradient of species mass fractions. The manual said that the macro C_YI_G(c,t,i) can be used only in the density-based solver. To use this in the pressure-based solver, you will need to set the rpvar 'species/save-gradients? to #t. What does that means? How can I set the "rpvar"? Since I know nothing about the scheming languages, can someone give me an example of how to set the rpval in my UDFs?

Thanks a lot.
How to calculate the gradient of species mole fraction in fluent?
scorpian is offline   Reply With Quote

Old   August 5, 2020, 00:57
Default How to calculate gradient of species mole fraction in fluent?
  #12
New Member
 
Debojit Sharma
Join Date: Aug 2020
Location: India
Posts: 10
Rep Power: 5
scorpian is on a distinguished road
Quote:
Originally Posted by coglione View Post
Type
(rpsetvar 'species/save-gradients? #t)
in the text-console of Fluent.
(rpgetvar 'species/save-gradients?) can be used to check the current value of this variable. It should return #t (true) now.
cheers
Hello sir,

I was trying to get calculate the gradients of species mass and mole fraction in fluent. I could find the command for gradient of species mass fraction from your chat in this platform. Could you help me how to get the gradient of species mole fraction in ANSYS-FLUENT?

Thanking you in anticipation,

With warm wishes,
Debojit Sharma
scorpian 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
gradient of species mass fraction zhou FLUENT 1 March 14, 2020 07:55
Gradient of species mass fraction zhou FLUENT 1 March 14, 2020 06:28
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
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 21:01.