|
[Sponsors] |
November 6, 2020, 06:53 |
not working DEFINE_DPM_SOURCE
|
#1 |
New Member
Monza e Brianza
Join Date: Nov 2020
Posts: 8
Rep Power: 5 |
Hi! I need your help, please
I want to model CO2 gas bubble dissolution in water. The VOF model is on to study the water-air inface; bubbles are modeled with dpm inert type particle; water is a mixture of water and dissolved CO2. To compute gas dissolution from the bubble and to add the dissolved gas to the mixture, I'm using DEEFINE_DPM_SOURCE macro. The source term so defined: S->species [co2_index] +=mp_dot; I can compile and load the UDF but when I run calculations the following message appears: DPM Iteration .... ================================================== ============================ Node 1: Process 3188: Received signal SIGSEGV. ================================================== ============================ The fl process could not be started. Here is my UDF: #include "dpm.h" #include "dpm_types.h" #include "dpm_laws.h" #include "udf.h" DEFINE_DPM_SOURCE(dissolution, c, t, S, strenght, tp) { real temp, P, Dco2, Sc, d, ki, kh, Ci, Cinf, massrate,mp_dot, Re, rel_vel; int co2_index = 0; temp = 288; d = TP_DIAM(tp); P = C_P(c, t); rel_vel = sqrt(pow((TP_VEL(tp)[0] - C_U(c,t)),2.0) + pow((TP_VEL(tp)[1] - C_V(c,t)), 2.0) + pow((TP_VEL(tp)[2] - C_W(c,t)), 2.0)); Re = TP_RHO(tp) * rel_vel * d/0.001003; Dco2 = (1.38*pow(10.0,-23.0)*temp)/(6.0*M_PI*0.001003*pow(10.0,-10.0)); Sc=0.001003/(TP_RHO(tp)*Dco2); if (d<0.0035) { ki=(2+0.6*pow(Re,1./2.)*pow(Sc,1./3.))*Dco2/d; } if(d<=0.0045 && d>0.0035) { ki=0.2838*d-0.0009121; } if (d>=0.0035){ ki=2/pow(M_PI, 1./2.)*pow(Re*Sc,1./2.)*Dco2/d; } kh=44*1000/101325*pow(2.7183,2119.05/temp-17.4141); Ci=P*kh; Cinf=C_YI(c, t, co2_index); massrate=M_PI*d*d*ki*(Ci-Cinf); mp_dot=massrate*TP_DT(tp)*strenght; S->species[co2_index] += mp_dot; } |
|
Tags |
define_dpm_source, dpm, gas dissolution, multiphase, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Porous media coefficients and working fluid | Dronzer | FLUENT | 1 | June 30, 2020 22:23 |
findCell() in parallel: not working if location is outside the domain | TobiWol | OpenFOAM | 0 | January 10, 2018 14:33 |
Processor 0 not working | vishwesh | OpenFOAM Running, Solving & CFD | 0 | November 17, 2017 03:35 |
DPM parallel is not working but serial is working | johnwinter | FLUENT | 1 | March 27, 2012 02:01 |
Error: Unable to retrieve mon from working directo | Atit Koonsrisuk | CFX | 6 | February 20, 2004 05:07 |