|
[Sponsors] |
gaussian distribution of momentum source term |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 3, 2023, 17:03 |
gaussian distribution of momentum source term
|
#1 |
New Member
kdot
Join Date: Aug 2023
Posts: 3
Rep Power: 3 |
Hello,
I have UDF's for mass and momentum that are used to model jet blowing near a surface (acts perpendicular to wall). A gaussian is used to distribute the mass and momentum sources. My mass source works as intended, the sum of the user mass source equals the input value of mass in the UDF and the structure of the gaussian is present. My code for the mass UDF is the following: #include "udf.h" DEFINE_SOURCE(SJ_Massb2, cell, thread, dS, eqn) { real mass; real massper; real C, h; real source; real xcc, ycc; real xc[ND_ND]; real sigmax, sigmay; real distribution_func; real r1, r2, A0; real vol; { C_CENTROID(xc,cell,thread); mass = 2.8194 ; // desired mass flow rate xcc = 0.2; // x mean location of jet sigmax = 1e-3;//%sigma value where 6*sigma = jet injector width sigmay = 1e-3;//% sigma value that acounts for jet penetration ycc = 3e-3 ; // y mean location of jet r1 = (xc[0]-xcc)*(xc[0]-xcc);// (x-xc)^2 for numerator in gaussian distribution r2 = (xc[1]-ycc)*(xc[1]-ycc);// (y-yc)^2 for numerator in gaussian distribution A0 = 1.0; // momentum coeff (amplitude)n % 1 by default distribution_func = pow(2.0*M_PI*(sigmax*sigmay),-1.0);// leading denominator in gaussian equation distribution_func = A0*distribution_func*exp(-r1/(2.0*(sigmax*sigmax))-r2/(2.0*(sigmay*sigmay)));// completed gaussian equation source = distribution_func*mass; // multiplying the gaussian by the source term dS[eqn] = 0.0; } return source; } The method I am using to model the momentum source has been used in several papers (if references are desired I can dig them up). The momentum source is applied as mass flow rate (of jet) * velocity (of jet) and then distributed by the gaussian. My issue is that the momentum source appears to be weak and has little to no effect on the flow. The mass source appears to be the main contributor. My momentum source only appears to have an effect (similar to that of modeling the jet orifice and inlet) if I increase the magnitude by a factor of ~10. This worries me because a factor of 10 in the momentum source (mass flow rate * velocity) would require an unreasonable mass or velocity. #include "udf.h" DEFINE_SOURCE(SJ_Ysourceb2, cell, thread, dS, eqn) { real source; real r1, r2; real distribution_func,sigmax,sigmay; real Upart,mass; real Uinf; real yc[ND_ND]; real xcc, ycc; real C, h; real angle; real cs, sn; real A0; real vol; { /* source term */ C_CENTROID(yc,cell,thread); sigmax = 1e-3;//sigma x to encapsulate all jets on surface sigmay = 1e-3;//jet penetration Upart = 1.4097; // velocity of jet mass = 2.8194;// mass flow rate of jet xcc = 0.2; // x mean location ycc = 3e-3; // y mean locaiton r1 = (yc[0]-xcc)*(yc[0]-xcc); r2 = (yc[1]-ycc)*(yc[1]-ycc); A0 = 1.0; // momentum coeff (amplitude) distribution_func = pow(2.0*M_PI*(sigmax*sigmay),-1.0); distribution_func = A0*distribution_func*exp(-r1/(2.0*(sigmax*sigmax))-r2/(2.0*(sigmay*sigmay))); source = (distribution_func*mass*Upart)*1;//mdot * U * gaussian dS[eqn] = 0.0; } return source; } I am wondering if I am somehow formulating the momentum source term incorrectly when I am using a gaussian to distribute the momentum. Is my momentum source formulation or application incorrect? |
|
Tags |
fluent - udf, momentum and mass, momentumsource, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 04:52 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
How does fluent handles the momentum source term? | QBeast | FLUENT | 0 | April 22, 2013 15:12 |