|
[Sponsors] |
December 18, 2015, 08:32 |
Export mass fraction in multiphase model
|
#1 |
New Member
AaronSyu
Join Date: Jun 2015
Posts: 13
Rep Power: 11 |
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. |
|
December 18, 2015, 09:05 |
|
#2 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
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 |
|
December 21, 2015, 05:58 |
|
#3 | |
New Member
AaronSyu
Join Date: Jun 2015
Posts: 13
Rep Power: 11 |
Quote:
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; |
||
|
|
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 05:03 |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
multiphase flow vof model with mass transfer | frikz | FLUENT | 1 | October 27, 2014 06:12 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Mass fraction and volume fraction | eric weddle | CFX | 0 | September 26, 2011 06:02 |