March 25, 2013, 01:51
|
New Solver: Multiplication
|
#1
|
Member
Cameron
Join Date: Jul 2012
Posts: 33
Rep Power: 14
|
Hi all.
I'm trying to create an incompressible version of firefoam, and I'm hitting a few problems. As i'm trying to use parts from incompressible solvers, I keep getting dimension mismatch errors, which would be easy to solve if I could put a multiply or divide by rho where I want to. I'm pretty new to C++ and openfoam in general, so it's probably something pretty obvious that i'm missing.
Basically, in the Y equation, which is originally:
Code:
fvScalarMatrix YiEqn
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->alphaEff(), Yi)
==
parcels.SYi(i, Yi)
+ surfaceFilm.Srho(i)
+ combustion->R(Yi)
+ fvOptions(rho, Yi)
);
I want to multiply the phi term in the line " mvConvection->fvmDiv(phi, Yi)" by rho, as the solver is now using the incompressible form of phi. I've tried just typing in *rho, but this doesn't seem to work, and I'm assuming there must be another way.
|
|
|