|
[Sponsors] |
problems coming from the new version of OpenFOAM (v7)) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 22, 2020, 00:03 |
problems coming from the new version of OpenFOAM (v7))
|
#1 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
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. |
|
June 22, 2020, 02:01 |
|
#2 |
New Member
Tu Can
Join Date: Jul 2017
Location: China
Posts: 16
Rep Power: 9 |
here is an upgrade guide from openfoam.com
openfoam.com user-upgrade-guide and release notes from openfoam.rog openfoam.org history may help. |
|
June 22, 2020, 04:54 |
|
#3 |
Member
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8 |
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. |
|
Tags |
boundary conditions, codestream, new version of openfoam, openfoam v7 |
|
|
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 06:29 |
[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 |
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 |