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

calculating inner product in openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2023, 02:49
Default calculating inner product in openfoam
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Hello everyone
I want to calculate below equation;
Code:
epsilonn = U & fvm::laplacian(U);
And I think result must be a volScalarField so I do it like this;
Code:
volScalarField  epsilonn = U & fvm::laplacian(U);
but it gives me below error;
Code:
UEqn.H:8:29: error: no match for ‘operator&’ (operand types are ‘Foam::volVectorField {aka Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>}’ and ‘Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’)
 volScalarField epsilonn = U & fvm::laplacian(U);
Which I do not know why since inner product must be a volScalarField. I will be thankful, if anyone help me with this problem.
farzadmech is offline   Reply With Quote

Old   January 2, 2023, 02:57
Default
  #2
Member
 
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4
überschwupper is on a distinguished road
use fvc instead of fvm and your problem schould disappear.
überschwupper is offline   Reply With Quote

Old   January 2, 2023, 15:09
Default
  #3
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Thanks a lot. it worked. and just another question, how can I have access to the value of the nu in momentum equation in pimpleFoam?

Thanks,
Farzad
Quote:
Originally Posted by überschwupper View Post
use fvc instead of fvm and your problem schould disappear.
farzadmech is offline   Reply With Quote

Reply

Tags
inner product, openfoam, volscalarfield


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
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 05:57
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 08:18
[swak4Foam] Difference in calculating div(U*U) swak4FOAM vs. OpenFOAM codedFunctionObject polo OpenFOAM Community Contributions 7 October 1, 2013 11:22


All times are GMT -4. The time now is 16:24.