An implicit source term which is a function of several cell values.
Hello Foamers,
I'm trying to implement an implicit source term along the lines of fvm::Sp(coeff, f(U) ) for an fvVectorMatrix quantity (namely U in this case) : Code:
fvVectorMatrix UEqn ( (this weighting calculation is done.) Any ideas on how to implement such a source term implicitly ? (or any pointers where such a thing has been done? ) Thank you very much. Kipri. |
Hi Kipri,
I am now facing the similar problem like yours. Now I need to implement the wall shear stress for solid phase (twophaseeulerfoam) through a source term in the momentum equation. The wall shear stress can be obtained via the following formular: Sp=Tauw=alpha1*rho1*st*(U1.component(2).boundaryFi eld ()[patchi].patchInternalField()) *(U1.boundaryField()[patchi].patchInternalField() - U1.boundaryField()[patchi]) where "st" is the friction factor which should be calculated ieratively through for (int i=0; i<10; i++) { st = sqr(kappa)/Log(E*Res*sqrt(st)); } where "Res" is the Reynolds number of solid which calculated by Res=rho1*U1.component(2).boundaryField()[patchi].patchInternalField()*y[facei]/mus However, now I wrote the codes in the Uequation but cannot be compiled. If you have some ideas, please tell me. Thanks. |
All times are GMT -4. The time now is 00:08. |