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

Export mass fraction in multiphase model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2015, 07:32
Default Export mass fraction in multiphase model
  #1
New Member
 
AaronSyu
Join Date: May 2015
Posts: 13
Rep Power: 10
aronsyu is on a distinguished road
Dear all

I am trying to calculate mass fraction but not sure what macro can use.

There is a macro named "C_YI" I found , I think that I can use it .(?)


model description:

1. laser hits on the metal powder, and it will melt when it received enough of energy.

2. no chemistry reaction

Can anyone help me to solve this problem?

Thank you.
aronsyu is offline   Reply With Quote

Old   December 18, 2015, 08:05
Default
  #2
Senior Member
 
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0
CeesH is on a distinguished road
Hi Aaron,

There is a distinction between multi-species and multi phase. The first is for multiple miscible species, the latter for immiscible. The C_YI macro is for multi-species (miscible) situations, where the simulation is single phase but you are tracking the mass fraction of some dissolved substance (this is enabled via the species equation, not via multiphase). For multiphase (Eulerian, VOF, etc.) the macro to find a phase volume fraction is C_VOF

Best regards
Cees
CeesH is offline   Reply With Quote

Old   December 21, 2015, 04:58
Default
  #3
New Member
 
AaronSyu
Join Date: May 2015
Posts: 13
Rep Power: 10
aronsyu is on a distinguished road
Quote:
Originally Posted by CeesH View Post
Hi Aaron,

There is a distinction between multi-species and multi phase. The first is for multiple miscible species, the latter for immiscible. The C_YI macro is for multi-species (miscible) situations, where the simulation is single phase but you are tracking the mass fraction of some dissolved substance (this is enabled via the species equation, not via multiphase). For multiphase (Eulerian, VOF, etc.) the macro to find a phase volume fraction is C_VOF

Best regards
Cees

Hi, Cees,

Thanks for your correction, I am deriving "mass fraction" from "volume fraction".
But here is the error occurred,

When I trying to use C_R(c,t) to export density of metal, error occurred.

Can you help me to point where is the problem it may happen?

Should I write it down in "DEFINE_SOURCE" or another macro?

Thank you

Aaron

--------my UDF code below----------

DEFINE_SOURCE(laser_source, c, t, ds, eqn)
{
Thread *pt; //VOF defination solid phase
int phase_index = 0; //VOF defination solid phase


face_t f;
real time,source,sourceup;
real radq,conv,epsi,delfc, testing, rho_s;


real x[ND_ND],s[ND_ND];

pt = THREAD_SUB_THREAD(t,phase_index);
//VOF defination solid phase
real rho = C_R(c,pt);
time = RP_Get_Real("flow-time");

C_CENTROID(x,c,t);
C_UDMI(c,t,rho) = rho_s;

return source;
aronsyu 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
Mass imbalance problem in multiphase water and steam CFX case Antech CFX 1 October 26, 2020 04:03
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 00:58
multiphase flow vof model with mass transfer frikz FLUENT 1 October 27, 2014 05:12
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Mass fraction and volume fraction eric weddle CFX 0 September 26, 2011 05:02


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