CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   New Solver: Multiplication (http://www.cfd-online.com/Forums/openfoam-programming-development/115141-new-solver-multiplication.html)

c_dowd March 25, 2013 03:51

New Solver: Multiplication
 
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.


All times are GMT -4. The time now is 20:25.