|
[Sponsors] |
February 22, 2023, 23:39 |
Dimension incompatible
|
#1 |
New Member
VanLap Nguyen
Join Date: Feb 2023
Posts: 1
Rep Power: 0 |
Dear Everyone,
I am new in OpenFoam, now I am building a solver (PisoFoam2) based on PisoFoam. In the momentum equation of PisoFoam is divided by rho. But I would like to build a solver that considers rho in the momentum equation, and it is not compressible. This is my UEqn code. fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(U) == fvOptions(rho, U) ); UEqn.relax(); fvOptions.constrain(UEqn); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); } I defined rho and rhoPhi in createFields.H, and in running case I changed the pressure file p to kg/m.s^2. I compiled successfully but when I run it showed that --> FOAM FATAL ERROR: incompatible dimensions for operation [U[1 -2 -2 0 0 0 0] ] + [U[0 1 -2 0 0 0 0] ] Please help me to solved this errors. Last edited by laptmu; February 23, 2023 at 21:44. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gmsh reports an OpenCascade exception when opening a .geo file | algc | Main CFD Forum | 2 | October 24, 2022 05:59 |
[ANSYS Meshing] Refinement dimension is not working | Tasos | ANSYS Meshing & Geometry | 0 | May 13, 2017 09:07 |
Incompatible dimensions for operation | ruben23 | OpenFOAM Running, Solving & CFD | 2 | June 12, 2015 04:14 |
incompatible dimension for operation means?? | Tushar@cfd | OpenFOAM | 4 | June 30, 2011 05:13 |
incompatible dimension with interFoam | aurelia | OpenFOAM Running, Solving & CFD | 2 | February 6, 2006 11:06 |