|
[Sponsors] |
Interfoam UEqn.H, where to add additional terms? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 22, 2023, 09:04 |
Interfoam UEqn.H, where to add additional terms?
|
#1 |
New Member
Luke Hirl
Join Date: Jul 2023
Location: Gießen
Posts: 16
Rep Power: 3 |
Disclaimer: probably already discussed somerwhere can´t find anything though, link would be enough
So I would like to add a electrostatic force term Code:
- fvc::interpolate(rhoE)*fvc::snGrad(Ue) - scalar(0.5)* fvc::interpolate(EE)*fvc::snGrad(eps) I know that if I add it to the momentum predictor only it needs to be turned on. Code:
MRF.correctBoundaryVelocity(U); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + MRF.DDt(rho, U) + turbulence->divDevRhoReff(rho, U) to add here? == fvOptions(rho, U) ); UEqn.relax(); volScalarField EE = magSqr(fvc::grad(Ue)); fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) or here? ) * mesh.magSf() ) ); fvOptions.correct(U); } |
|
August 23, 2023, 10:18 |
|
#2 | |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
Quote:
do you think pEqn should be changed accordingly? if you've known how U and pEqn come, you will see what and where changes should be imposed. |
||
August 28, 2023, 17:34 |
|
#3 |
New Member
Luke Hirl
Join Date: Jul 2023
Location: Gießen
Posts: 16
Rep Power: 3 |
Hi Alundilong,
so I read a bit further into the solver. Correct me if I am wrong but as far as I understand it the Navier-Stokes Equation is solved as follows: In the UEqn.H I first construct the U vector Matrix and then have the option to use the momentum predictor to kind off precalculate the velocity field. But the final calculation of the velocity field happens in pEqn.H after I iteratively solved the pressure Equation. So therefore as you already said I should either implement it in the U vector Matrix or the pressure Equation and in the latter case if I want to use the momentum predictor there as well. |
|
August 29, 2023, 04:26 |
|
#4 |
Senior Member
|
You can use source function object to specify a momentum source term.
See e.g. https://www.openfoam.com/documentati...s-sources.html . |
|
Tags |
electrohydrodynamic, interfoam, modify solver, term, ueqn.h |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to add additional species diffusion term in FLUENT | Sowmiya | FLUENT | 3 | March 28, 2021 14:34 |
Modeling Additional source terms | Abed | Main CFD Forum | 0 | November 24, 2007 07:17 |
how to add source terms to a cell? | lily | FLUENT | 5 | May 24, 2006 05:38 |
Source terms for additional variable transport eqn | Nandini Rohilla | CFX | 0 | February 6, 2004 14:38 |
Additional terms in Differential Stress Model | Fabio Kasper | CFX | 1 | February 9, 2000 03:39 |