CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Electromagnetics

I'm having the "error: no matching function.." when compiling a modified mhdFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2020, 22:10
Default I'm having the "error: no matching function.." when compiling a modified mhdFoam
  #1
New Member
 
Kevi Pegoraro
Join Date: Jun 2020
Posts: 1
Rep Power: 0
kevi is on a distinguished road
I'm adding the mass conservation equation to the mhdFoam solver because I want to do a simulation of the ideal 1-fluid mhd case. For that I also defined the rho in the createfields field, I researched this error and found that first argument should always be flux as surface field. But even so I could not tackle the cause of the error I am facing, I am new to opemFoam, if anyone knows how to help me I would be very grateful.

I am using Ubuntu 20.0 and the latest version of OpemFoam.
I added this lines below the piso loop in mhdFoam.c:
Quote:
// defining the time derivative of rho, continuity equation
fvScalarMatrix Cnt (fvm::ddt(rho) + fvm::div(1.0,rho*U));

// end also with ...div(phi,rho*U))
// solving the continuity equation
Cnt.solve();
I added this lines in creatFields.c:
Quote:
Info<< "Reading field rho\n" << endl; //I added the temporal dependence for rho
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
);
error:

Quote:
error: no matching function for call to ‘div(Foam::surfaceScalarField&, Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> >)’
136 | fvScalarMatrix Cnt (fvm::ddt(rho) + fvm::div(phi,rho*U));
kevi is offline   Reply With Quote

Reply

Tags
mhdfoam, no matcing function, openfoam


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 121 June 11, 2021 11:05
Error in compiling new drag model k.farnagh OpenFOAM Programming & Development 13 May 21, 2016 04:08
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


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