CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2020, 23:03
Default problems coming from the new version of OpenFOAM (v7))
  #1
Member
 
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 7
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(p.select(piso.finalInnerIte r())));
(in the header file pEqn.H of solvers such as pisoFoam)

cannot been executed. This was solved by using

pEqn.solve( );

instead.



2. An executing of BC codeStream as

upWall
{
type fixedValue;
value #codeStream
{
codeInclude
#{
#include "fvCFD.H"
#};

codeOptions
#{
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
#};

codeLibs
#{
-lmeshTools \
-lfiniteVolume
#};

code
#{
const IOdictionary& d = static_cast<const IOdictionary&>
(
dict.parent().parent()
);
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;
forAll(potenH,i)
{
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 605b.so"

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, 01:01
Default
  #2
New Member
 
bestucan's Avatar
 
Tu Can
Join Date: Jul 2017
Location: China
Posts: 16
Rep Power: 8
bestucan is on a distinguished road
here is an upgrade guide from openfoam.com

openfoam.com user-upgrade-guide


and release notes from openfoam.rog
openfoam.org history


may help.
bestucan is offline   Reply With Quote

Old   June 22, 2020, 03:54
Default
  #3
Member
 
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 7
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

Reply

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


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