CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

foam-extend 4.0, FSI extension.

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By alia
  • 2 Post By alia
  • 3 Post By rr3245

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2017, 10:30
Default foam-extend 4.0, FSI extension.
  #1
New Member
 
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10
rr3245 is on a distinguished road
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
The following thread addresses some of these issues, where it is suggested that fluxRequired should be disabled:

HTML Code:
https://www.cfd-online.com/Forums/openfoam-solving/185685-fsifoam-4-0-can-not-run-tutorials.html
The source code has been updated since that thread, incorporating some of the 'fixes'. I have been trying to update a createFields.H file as suggested in the above thread:

"You have to integrate that line into your createFields.H and recompile your solver."
Code:
mesh.schemesDict().setFluxRequired(p.name());
However, the createFields.H appears to have been blended into icoFluid.C, consistentIcoFluid.C, and pisoFluid.C. For example, below is an excerpt from pisoFluid.C :

Code:
pisoFluid::pisoFluid(const fvMesh& mesh)
:
    fluidSolver(this->typeName, mesh),
    U_
    (
        IOobject
        (
            "U",
            runTime().timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    ),
    p_
    (
Therefore the fix suggested above isn't valid, and I don't know what to try next. Has anybody been able to run tutorials for the fsiFoam recently?

Regards, RH.
rr3245 is offline   Reply With Quote

Old   November 20, 2017, 12:37
Default
  #2
New Member
 
alia's Avatar
 
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12
alia is on a distinguished road
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());
Cheers
sangeet likes this.
alia is offline   Reply With Quote

Old   November 21, 2017, 08:31
Default
  #3
New Member
 
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10
rr3245 is on a distinguished road
Quote:
Originally Posted by alia View Post
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());
Cheers
My solver seems to break on consistentIcoFluid, so I have tried adding the line above to consistentIcoFluid.C and consistentIcoFluid.H. Both those files have an evolve() function, but I am not sure where to include the line.

Could you please identify which files need to be edited, and where?

Thanks,
RH.
rr3245 is offline   Reply With Quote

Old   November 21, 2017, 08:39
Default
  #4
New Member
 
alia's Avatar
 
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12
alia is on a distinguished road
Quote:
Originally Posted by rr3245 View Post
My solver seems to break on consistentIcoFluid, so I have tried adding the line above to consistentIcoFluid.C and consistentIcoFluid.H. Both those files have an evolve() function, but I am not sure where to include the line.

Could you please identify which files need to be edited, and where?

Thanks,
RH.
.H files of classes are just for declarations. you definitely should add that line in the .C file. you need to add the line inside the scope of evolve() function after the line
Code:
    const fvMesh& mesh = fluidSolver::mesh();
cheers
alia is offline   Reply With Quote

Old   November 21, 2017, 09:25
Default
  #5
New Member
 
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10
rr3245 is on a distinguished road
Quote:
Originally Posted by alia View Post
.H files of classes are just for declarations. you definitely should add that line in the .C file. you need to add the line inside the scope of evolve() function after the line
Code:
    const fvMesh& mesh = fluidSolver::mesh();
cheers

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"));
I have downloaded the fsi package once again and made the above changes to my icoFluid.C, consistentIcoFluid.C, and pisoFluid.C files. I get an error when compilling with './Allwmake':


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());
rr3245 is offline   Reply With Quote

Old   November 21, 2017, 12:57
Default
  #6
New Member
 
alia's Avatar
 
Ali Aghaei
Join Date: Oct 2014
Posts: 12
Rep Power: 12
alia is on a distinguished road
in that case you need to use the access function p():
Code:
 mesh.schemesDict().setFluxRequired(p().name());
i.sabahi and russel60 like this.
alia is offline   Reply With Quote

Old   November 21, 2017, 13:15
Default
  #7
New Member
 
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10
rr3245 is on a distinguished road
Quote:
Originally Posted by alia View Post
in that case you need to use the access function p():
Code:
 mesh.schemesDict().setFluxRequired(p().name());
That seems to have worked. I will update this once I test it properly. Thanks for the guidance. RH.
rr3245 is offline   Reply With Quote

Old   November 22, 2017, 05:31
Default
  #8
New Member
 
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10
rr3245 is on a distinguished road
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());
after

Code:
const fvMesh& mesh = fluidSolver::mesh();
...into:
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.
rr3245 is offline   Reply With Quote

Reply


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
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


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