CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Dimension incompatible

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2023, 23:39
Default Dimension incompatible
  #1
New Member
 
VanLap Nguyen
Join Date: Feb 2023
Posts: 1
Rep Power: 0
laptmu is on a distinguished road
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.
laptmu is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 19:51.