- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **how to implement this kind of equation**
(*http://www.cfd-online.com/Forums/openfoam-solving/67110-how-implement-kind-equation.html*)

how to implement this kind of equationhi there!
I'm modeling a combustion problem(2D problem) and I have trouble implementing this equation: (vs rhoapp Cps)d/dx(Ts)-laplacian(lambda,Ts) = S; where d/dx stands for derivative with respect to x vs stands for the velocity of the household refuse entering the incinerator (dimensionedVector) rhoapp is a volScalarfield (density) Cps is the heat capacity S is a source term Here is what I tried: solve ( -fvm::laplacian(lambdaeff,Ts)+fvm::div(rhoappvsCp, Ts) ==S ); coupled with the gas mixture temperature (in order to take into account the convective transfer included in the source term of both equations) which is: solve(fvm::div(phi,T) == SS); rhoappvsCp is surfaceScalarField it starts well but it crashes after. I thought it was due to the boundary condition in the beginning(conservative flux) but when I turned it into a transient problem which gave: solve ( -fvm::laplacian(lambdaeff,Ts)+fvm::ddt(rhoappvsCp, Ts) == S ); solve ( fvm::ddt(rhoCpporo, T)+fvm::div(phi,T) == SS ); it's ok,it ran well and gave an accurate solution! Then I ended up thinking that the problem was due to the implementation of this term ""(vs rhoapp Cps)d/dx(Ts)"" So I tried to do something else like this: solve ( -fvm::laplacian(lambdaeff,Ts)+rhoappvsCp*(myvector & fvc::grad(Ts)) == S ); Because I thought that it was a gradient term but the y component should be eliminated then I created a vector myvector (1 0 0),and with the inner product the y component is omitted! it still crashed!!!! in the source code I also have to implement the density equation which is: d/dx(vs rhoapp) = S and I went on with the elimination of the y-component: mag(vs)*(myvector & fvc::grad(rhoapp)) == Srhoapp but it sends an error message!!!before,I took it as divergence term using fvm::div(svs,rhoapp) = Srhoapp svs is a surfaceScalarField and it runs well but I don't think that it is a divergence term!!! So my question is how to implement this kind of equation "(vs rhoapp Cps)d/dx(Ts)" and this "d/dx(vs rhoapp)" DIVERGENCE OR GRADIENT WITH Y-COMPONENT ELIMINATED?? I'M QUITE STUCK!!! Please can somebody help me out? Best Regards |

Dear Mihamina,
when you drop the ddt-term from the standard transport equation, the resulting linear system becomes unsuitable for the linear solvers that are commonly used in CFD. Therefor you MUST underrelax the equation. Did you and did it have an effect, that is change the number of iterations? You don't need special treatment for 2D cases on the top level. My bet is that you can safely throw that in the bin. Henrik |

Hi Henrik,
I will follow your advice by underrelaxing it because I didn't think about it!! Thanks a lot |

All times are GMT -4. The time now is 16:01. |