
[Sponsors] 
July 6, 2016, 17:10 

#41  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 10 
Quote:
Since you were not familiar with transient/steady state problems, I suggest you to read Patankar's book (S.V. Patankar, Numerical Heat Transfer and Fluid Flow  you can find it online). You will get information about the time step you can use, and also the different transient methods you can apply. 

July 6, 2016, 17:20 

#42  
Member
Join Date: Jun 2016
Posts: 64
Rep Power: 7 
Quote:
The only reason I haven't been testing the physics using the steady solver is due to the porosity being a function of time. Is there a temporary workaround for this so that I can use the steady solver until I establish a viable model? 

July 7, 2016, 13:02 

#43  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 10 
Quote:


July 16, 2016, 09:53 
variable porosity

#44 
New Member
Hooman
Join Date: Jan 2016
Posts: 19
Rep Power: 7 
Hi all,
I am simulation porous media that at first there are water, methane and hydrate (solid phase), as the pressure decreases the solid phase(hydrate) will dissociate to water and methane. here i have to define a effective porosity that is a function of hydrate saturation using UDF. phi(eff)=phi(abs)*(1Saturation(hydrate)) can any one help me how to do it? 

July 20, 2016, 05:20 

#45  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 10 
Quote:
There are many examples in this topic, have a look, try it and return questions if you have. 

July 20, 2016, 07:55 
hydrate dissociation

#46  
New Member
Hooman
Join Date: Jan 2016
Posts: 19
Rep Power: 7 
Quote:
i am new in fluent and i have some basic questions. i have defined two phases (water and methane) in porous media, now i have to define the third phase (hydrate as a solid phase ) that is stagnant and has no motion. 1)how can i define the initial saturation of this solid phase in porous media? does it need a UDF? 2) the hydrate will dissociate as the pressure fall bellow the hydrate stability pressure (p(equilibrium). ch4.6h2o> ch4 + 6h2o should i define it as a reaction or just a multi phase flow with defining source and sink? 3) i have to define the kinetic of hydrate dissociation for fluent using UDF, mass generation rate of gas= K*phi*S(hydrate)*(p(equilibrium)p) phi= porosity, K=dissociation rate constant, S= saturation of hydrate, p=pressure should i define this in source term of mass equation? your answer will be helpfull for me. thank you. 

July 20, 2016, 08:05 

#47  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 10 
Quote:
2) You can define the reactions in your UDF and use it as source/sink term for the mass/species equation. 3) If you have the generation or sink of species, both mass and species conservation equations must be considered for this source/sink term, otherwise there will be no conservation. 

July 20, 2016, 13:04 

#48  
Member
Join Date: Jun 2016
Posts: 64
Rep Power: 7 
Quote:
Quote:
My questions is will either of these two methods do what I'm trying to do? And if so, which one is preferred? Last edited by Baden; July 20, 2016 at 19:02. 

July 22, 2016, 07:24 

#49  
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 10 
Quote:


July 22, 2016, 17:15 

#50  
Member
Join Date: Jun 2016
Posts: 64
Rep Power: 7 
Quote:
Here is the code I'm currently using: Code:
#include "udf.h" #define ID 2 /* thread ID of the fluid (porous zone) */ DEFINE_INIT(UDMI_init, d) { Domain *d = Get_Domain(1); Thread *t = Lookup_Thread(d, ID); cell_t c; FILE *fp; int i; int j = 0; float f1[10000]; fp = fopen("data.txt", "r"); for (i = 0; i < 10000; i++) { fscanf(fp, "%f", &f1[i]); } fclose(fp); thread_loop_c(t, d) { begin_c_loop(c, t) { C_UDMI(c, t, 0) = C_UDMI(c, t, 1) = C_UDMI(c, t, 2) = f1[j]; j++; } end_c_loop(c, t) } }


July 25, 2016, 07:07 
porous media

#51  
New Member
Hooman
Join Date: Jan 2016
Posts: 19
Rep Power: 7 
Quote:
i want to simulate porous media just for one phase in two way 1) Check the “Porous Zone” to enable porous zone in cell zone condition 2) using a momentum source term i have done them and the pressure contours in both was the same. but the velocity contours was different. the code is: #include "udf.h" #define por_gdl 0.4 #define i_permeability 5.68e6 // Inverse Permeability (1/m^2) #define urf 0.1 // under relaxation factor for stability of momentum source term real s1=0., s2=0.; DEFINE_SOURCE(xmom_src,c,t,dS,eqn) { real source, mu, u; mu = C_MU_L(c,t); u = C_U(c,t); source = (mu*u*i_permeability); dS[eqn] = (mu*i_permeability); s1 = s1*(1urf) + source*urf; return s1; } DEFINE_SOURCE(ymom_src,c,t,dS,eqn) { real source, mu, v; mu = C_MU_L(c,t); v = C_V(c,t); source = (mu*v*i_permeability); dS[eqn] = (mu*i_permeability); s2 = s2*(1urf) + source*urf; return s2; } can u tell me what is the problem? 

Tags 
acid, porosity, time, transient, udf 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
decomposePar problem: Cell 0contains face labels out of range  vaina74  OpenFOAM PreProcessing  37  July 20, 2020 06:38 
simpleFoam error  "Floating point exception"  mbcx4jc2  OpenFOAM Running, Solving & CFD  12  August 4, 2015 03:20 
Help for the small implementation in turbulence model  shipman  OpenFOAM Programming & Development  25  March 19, 2014 11:08 
pisoFoam with kepsilon turb blows up  Some questions  Heroic  OpenFOAM Running, Solving & CFD  26  December 17, 2012 04:34 
Orifice Plate with a fully developed flow  Problems with convergence  jonmec  OpenFOAM Running, Solving & CFD  3  July 28, 2011 06:24 