CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

problems coming from the new version of OpenFOAM (v7))

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2020, 00:03
Default problems coming from the new version of OpenFOAM (v7))
Wenming Yang
Join Date: Jun 2018
Posts: 41
Rep Power: 4
ywem is on a distinguished road
Dear formers,
Recently I tried to transplanted a previous programmed solver, which is run well in OpenFOAM 5.0, to the newest version, OpenFOAM v7. The following problems were encountered,

1. the class fvMesh does not have a member function solver(). So the sentence

pEqn.solve(mesh.solver( r())));
(in the header file pEqn.H of solvers such as pisoFoam)

cannot been executed. This was solved by using

pEqn.solve( );


2. An executing of BC codeStream as

type fixedValue;
value #codeStream
#include "fvCFD.H"

-I$(LIB_SRC)/finiteVolume/lnInclude \

-lmeshTools \

const IOdictionary& d = static_cast<const IOdictionary&>
const fvMesh& mesh = refCast<const fvMesh>(d.db());
const label id = mesh.boundary().findPatchID("upWall");
const fvPatch& patch = mesh.boundary()[id];

scalarField potenH(patch.size(), scalar(0));
const scalar H_0 = 1.4835e3;
const scalar h = 0.2e-3;
const scalar x = patch.Cf()[i][0];
potenH[i] = scalar(0. - H_0*h - 0.2*H_0*x);
potenH.writeEntry("", os);

encounted the following problem

Failed wmake "dynamicCode/_63e33dcbd665576f46bbc4b2803f07eb39c7605b/platforms/linux64GccDPInt32Opt/lib/libcodeStream_63e33dcbd665576f46bbc4b2803f07eb39c7"

file: /home/yw/OpenFOAM/ym-7/run/SelfProgrammedSolvers/fhdFoam/fhdTut/2_channelFlowGradientField/2H0ByFoam/0/potenH.boundaryField.upWall from line 35 to line 35.

From function static void (* Foam::functionEntries::codeStream::getFunction(con st Foam::dictionary&, const Foam::dictionary&))(Foam::Ostream&, const Foam::dictionary&)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 215.

FOAM exiting

and this problem was not solved. Does anyone has ideas? Thank you in advance.
ywem is offline   Reply With Quote

Old   June 22, 2020, 02:01
New Member
Tu Can
Join Date: Jul 2017
Location: China
Posts: 15
Rep Power: 5
bestucan is on a distinguished road
here is an upgrade guide from user-upgrade-guide

and release notes from openfoam.rog history

may help.
bestucan is offline   Reply With Quote

Old   June 22, 2020, 04:54
Wenming Yang
Join Date: Jun 2018
Posts: 41
Rep Power: 4
ywem is on a distinguished road
Dear Bestucan,

Thanks for your reminder.

The problem 2 was finially addressed by replacing "potenH.writeEntry("", os)" with "writeEntry(os, "", potenH)" and it works well now.
ywem is offline   Reply With Quote


boundary conditions, codestream, new version of openfoam, openfoam v7

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
[Gmsh] gmshToFoam on openfoam windows version of OpenFOAM v1812? SihunLee OpenFOAM Meshing & Mesh Conversion 0 June 17, 2019 06:44
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 06:19
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
Convergence Problems using Spalart Allmaras recnice OpenFOAM Running, Solving & CFD 3 October 9, 2013 13:19

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