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

FOAM FATAL ERROR:Operator + is undefined for unoriented and oriented types

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2018, 10:31
Default FOAM FATAL ERROR:Operator + is undefined for unoriented and oriented types
  #1
New Member
 
Ningyi Li
Join Date: Jun 2018
Location: Germany
Posts: 6
Rep Power: 8
lny200912 is on a distinguished road
Hi, FOAMERS,


I have met one error when I run my programming. In my programming, I redefined the way to calculate rho and phi in the following codes:

rho1 = theta_Psi * p0;
phi1 = fvc::interpolate(rho1) * fvc::interpolate(U) & mesh.Sf();



Then I used the rho1 and phi1 in my equation file:


fvScalarMatrix theaEqn
(
fvm::ddt(rho1, theta1)
+ mvConvection->fvmDiv(phi1, theta1)
- fvm::laplacian(turbulence->muEff(), theta1)
==
theta_1RR

);



And I modified discrete format in the sytem/fvScheme file:


ddtSchemes
{
// default Euler;
default backward;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;

div(phi,U) Gauss limitedLinearV 1;
div(phi1,U) Gauss limitedLinearV 1;

div(phi,Yi_h) Gauss limitedLinear 1;
div(phi1,Yi_h) Gauss limitedLinear 1;

div(phi,K) Gauss limitedLinear 1;

div(phid,p) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
// div(phi1,epsilon) Gauss limitedLinear 1;

div(phi,k) Gauss limitedLinear 1;
// div(phi1,k) Gauss limitedLinear 1
;



However when I run my programming in the counterFlowFlame2D case, there is one error like this:


--> FOAM FATAL ERROR:
Operator + is undefined for unoriented and oriented types

From function Foam:rientedType Foam:perator+(const Foam:rientedType&, const Foam:rientedType&)
in file orientedType/orientedType.C at line 461.

FOAM aborting


#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:perator+(Foam:rientedType const&, Foam:rientedType const&) at ??:?
#3 void Foam::add<double, double, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::type OfSum<double, double>::type, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?



Could someone can help me to explain the meaning of this error and how to solve it? Thank you so much.


Ning
lny200912 is offline   Reply With Quote

Old   November 30, 2019, 01:48
Default Set to nonOriented type
  #2
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11
usv001 is on a distinguished road
Dear all,

I understand that this is an old thread but I faced a similar issue recently. While I don't understand the real meaning of this error, I found out that it occurred when trying to add the face flux (defined below) to some other quantity.

Code:
surfaceScalarField phi(Uf & mesh.Sf());
I found out that setting the flux to a nonOriented type, as shown below, solved the problem.

Code:
phi.setOriented(false);
Hope this helps future users. Maybe someone could explain what this error means and the correct way to handle it...

Best,
USV
usv001 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
--> FOAM FATAL ERROR: Operator + is undefined for oriented and unoriented types gamemakerh OpenFOAM 4 February 25, 2018 11:35


All times are GMT -4. The time now is 00:14.