|
[Sponsors] |
An implicit source term which is a function of several cell values. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 3, 2020, 18:53 |
An implicit source term which is a function of several cell values.
|
#1 |
New Member
Kipri
Join Date: Mar 2020
Posts: 1
Rep Power: 0 |
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 ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == fvm::Sp(coeff, f(U)) ); (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. |
|
March 4, 2020, 04:45 |
|
#2 |
Senior Member
|
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 35 | April 29, 2022 15:35 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 09:07 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 01:22 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |