|
[Sponsors] |
Source term for Momentum giving segementation fault |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 27, 2017, 07:56 |
Source term for Momentum giving segementation fault
|
#1 |
Member
sebastian bergman
Join Date: Mar 2017
Location: seattle
Posts: 52
Rep Power: 9 |
In my momentum equation owing to density difference i have to write a source term udf. the source term is,
source term= - ρl.(1+∝).u ⃗ .∂fl/∂t where ∝ = the volume of fraction variable fl = liquid fraction ul = Velocity vector ρl and ρs = liquid and solid density respectively I did write a udf for it -----for x-momentum---- #include "udf.h" #define rho_l 1544.0 #define rho_s 1648.0 DEFINE_SOURCE(x_momentum_source,c,t,dS,eqn) { real source; source = -(rho_l*(1+C_VOF(c,t))*C_U(c,t)*((C_LIQF(c,t)-C_LIQF_M1(c,t))/CURRENT_TIMESTEP)); dS[eqn] = 0; return source; } ----for y-momentum----- #include "udf.h" #define rho_l 1544.0 #define rho_s 1648.0 DEFINE_SOURCE(y_momentum_source,c,t,dS,eqn) { real source; source = -(rho_l*(1+C_VOF(c,t))*C_V(c,t)*((C_LIQF(c,t)-C_LIQF_M1(c,t))/CURRENT_TIMESTEP)); dS[eqn] = 0; return source; } i hooked it in the cell zone section. i was using the VOF module. IT is giving me a segmentation fault. I am not able to understand the mistake here. can anybody help? |
|
October 20, 2017, 09:37 |
|
#2 |
New Member
Hooman
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
Did you solve your problem?
I have the same error. if it has solved please tell me. thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Term due to evaporation in energy transport equation | styleworker | OpenFOAM Programming & Development | 3 | September 7, 2022 04:09 |
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error | FerdiFuchs | OpenFOAM Community Contributions | 27 | April 16, 2014 16:14 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 04:43 |