|
[Sponsors] |
October 3, 2017, 10:30 |
foam-extend 4.0, FSI extension.
|
#1 |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Hi all,
I am running foam-extend 4.0 and trying to use the FSI toolkit, however I get the following error message when running the 3 tutorials in fsiFoam: Code:
Time = 0.1, iteration: 1 Current fsi under-relaxation factor: 0.4 Creating accumulated fluid interface displacement Maximal accumulated displacement of interface points: 0 GAMG: Solving for cellMotionUx, Initial residual = 0, Final residual = 0, No Iterations 1 GAMG: Solving for cellMotionUy, Initial residual = 0, Final residual = 0, No Iterations 1 GAMG: Solving for cellMotionUz, Initial residual = 0, Final residual = 0, No Iterations 1 Evolving fluid solver: consistentIcoFluid Courant Number mean: 2.74517e-18 max: 0.425797 velocity magnitude: 0.0464238 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 3.27614e-07, No Iterations 4 DILUPBiCG: Solving for Uy, Initial residual = 0.988361, Final residual = 8.95334e-07, No Iterations 4 DILUPBiCG: Solving for Uz, Initial residual = 0.985989, Final residual = 9.63029e-07, No Iterations 4 GAMG: Solving for p, Initial residual = 1, Final residual = 7.79802e-07, No Iterations 19 GAMG: Solving for p, Initial residual = 2.59508e-05, Final residual = 3.63815e-07, No Iterations 2 --> FOAM FATAL ERROR: flux requested but p not specified in the fluxRequired sub-dictionary of fvSchemes. From function fvMatrix<Type>::flux() in file lnInclude/fvMatrix.C at line 1046. FOAM aborting HTML Code:
https://www.cfd-online.com/Forums/openfoam-solving/185685-fsifoam-4-0-can-not-run-tutorials.html "You have to integrate that line into your createFields.H and recompile your solver." Code:
mesh.schemesDict().setFluxRequired(p.name()); Code:
pisoFluid::pisoFluid(const fvMesh& mesh) : fluidSolver(this->typeName, mesh), U_ ( IOobject ( "U", runTime().timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ), p_ ( Regards, RH. |
|
November 20, 2017, 12:37 |
|
#2 |
New Member
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12 |
Hi!
you just need to add the following line to your fluid solver at the begining of evolve() function : Code:
mesh.schemesDict().setFluxRequired(p_.name()); |
|
November 21, 2017, 08:31 |
|
#3 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Quote:
Could you please identify which files need to be edited, and where? Thanks, RH. |
||
November 21, 2017, 08:39 |
|
#4 | |
New Member
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12 |
Quote:
Code:
const fvMesh& mesh = fluidSolver::mesh(); |
||
November 21, 2017, 09:25 |
|
#5 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Quote:
That's pretty much what I've been trying, but with no luck. Here is an excerpt from fluidSolidInteraction/fluidSolvers/icoFluid/icoFluid.C: Code:
void icoFluid::evolve() { Info << "Evolving fluid solver: " << this->type() << endl; const fvMesh& mesh = fluidSolver::mesh(); //EDIT START mesh.schemesDict().setFluxRequired(p_.name()); //EDIT END int nCorr(readInt(fluidProperties().lookup("nCorrectors"))); int nNonOrthCorr = readInt(fluidProperties().lookup("nNonOrthogonalCorrectors")); Code:
lnInclude/icoFluid.H: In member function ‘virtual void Foam::fluidSolvers::consistentIcoFluid::evolve()’: lnInclude/icoFluid.H:66:24: error: ‘Foam::volScalarField Foam::fluidSolvers::icoFluid::p_’ is private volScalarField p_; ^ fluidSolvers/consistentIcoFluid/consistentIcoFluid.C:149:36: error: within this context mesh.schemesDict().setFluxRequired(p_.name()); |
||
November 21, 2017, 12:57 |
|
#6 |
New Member
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12 |
in that case you need to use the access function p():
Code:
mesh.schemesDict().setFluxRequired(p().name()); |
|
November 21, 2017, 13:15 |
|
#7 |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
||
November 22, 2017, 05:31 |
|
#8 |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Thanks for your help alia. For completeness, this is what I did:
I inserted one line of code into the evolve() function for each fluidSolver (i.e. consistentIcoFluid.C, icoFluid.C, pisoFluid.C) Insert Code:
mesh.schemesDict().setFluxRequired(p().name()); Code:
const fvMesh& mesh = fluidSolver::mesh(); src/fluidSolidInteraction/fluidSolvers/consistentIcoFluid/consistentIcoFluid.C src/fluidSolidInteraction/fluidSolvers/icoFluid/icoFluid.C src/fluidSolidInteraction/fluidSolvers/pisoFluid/pisoFluid.C Then I ran ./Allwmake to update and the beam tutorial ran fine. RH. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error with reactingFoam | BakedAlmonds | OpenFOAM Running, Solving & CFD | 4 | June 22, 2016 03:21 |
[OpenFOAM] Saving ParaFoam views and case | sail | ParaView | 9 | November 25, 2011 16:46 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |