CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   chtMultiRegionSimpleFoam issues - non-conformal meshes & residual handling... (https://www.cfd-online.com/Forums/openfoam-solving/190193-chtmultiregionsimplefoam-issues-non-conformal-meshes-residual-handling.html)

manalis July 7, 2017 07:57

chtMultiRegionSimpleFoam issues - non-conformal meshes & residual handling...
 
Hello Foamers,

I have been facing some problems with the use of the "conjugate heat transfer solver - chtMultiRegionSimpleFoam" lately and I would like to get another opinion on some specific issues. First of all, for this thread I will be referring to the v4.1 of OpenFOAM. More specifically I am facing some problems regarding:

1) The use of non-conformal meshes between "fluid" and "solid" regions. I have noticed that even if I change the boundary "type" for the coupled patch in "constant/polyMesh/boundary" from "wall" to
Code:

    Coupled_wall_fluid
    {
        type            mappedWall;
        nFaces          24000;
        startFace      1339125;
        sampleMode      nearestPatchFaceAMI;
//        sampleMode      nearestPatchFace;
        sampleRegion    Solid;
        samplePatch    Coupled_wall_solid;

and respectively for the "solid" region:

Code:

    Coupled_wall_solid
    {
        type            mappedWall;
        nFaces          10000;
        startFace      289600;
        sampleMode      nearestPatchFaceAMI;
//        sampleMode      nearestPatchFace;
        sampleRegion    region0;
        samplePatch    Coupled_wall_fluid;
    }

the interpolation for non-conformal meshes doesn't seem to work, despite the use of "sampleMode: nearestPatchFaceAMI". The result is kind of strange because the heat doesn't seem to be conducted inside the solid at all, not to say that it doesn't reach the fluid region. The solid temperature appears to be almost exactly equal to the initial even after "convergence".

On the other hand, when the 2 coupled boundary patches (mesh created in salome as <unv> for the record) are conformal, then the solution appears to be more meaningful. Heat is conducted through the solid and is convected to fluid, judging from the temperature fields in paraview when post processing the results.

Is it something that has to do with the "nearestPatchFaceAMI" mode? Could this be a bug or is it something else that I am missing here?

2) For the same (steady state) solver I have noticed that up to the v4.1 there seem to be an issue with the residual control for multiple regions. I have already seen the bug report and the solution that was implemented in OpenFOAM-dev for the solver (https://github.com/OpenFOAM/OpenFOAM...gionSimpleFoam)

My problem in this case is that even with this fix, residual control doesn't seem to work! (at least for me!)

What I did was to compile the fixed solver from the OpenFOAM-dev repository as a custom solver in OF v4.1 environment, named as "customCHTMultiRegionSimpleFoam". The compilation was successful, but when I try to declare the convergence criteria in "system/fvSolution" under "SIMPLE" dictionary as usual:

Code:

    residualControl
    {
        p_rgh                    1e-3;
        U                  1e-3;
        "(k|epsilon|omega)" 1e-3;
              h                        1e-3;

//        tolerance 1e-03;
    }

I always receive the following error message:

Code:

Time = 1


Solving for fluid region region0


--> FOAM FATAL ERROR:
Attempt to return primitive entry ITstream : /home/bot/OpenFOAM/kostas-4.1/run/my_cases_mech_v4-1/submit_test_case_CHT_pipe_v0/system/fvSolution.SIMPLE.residualControl.U, line 86, IOstream: Version 2.0, format ASCII, line 0, OPENED, GOOD
    primitiveEntry 'U' comprises
        on line 86 the doubleScalar 0.001
 as a sub-dictionary

    From function virtual const Foam::dictionary& Foam::primitiveEntry::dict() const
    in file db/dictionary/primitiveEntry/primitiveEntry.C at line 189.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::primitiveEntry::dict() const at primitiveEntry.C:?
#3  Foam::dictionary::subOrEmptyDict(Foam::word const&, bool) const at ??:?
#4  ? at ??:?
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  ? at ??:?

So, if I comment all these lines and leave just the line "tolerance 1e-03" in "residualControl" subDict for both the "fluid" and "solid" "fvSolution" dictionaries, the solution begins and runs normally but the residual control doesn't seem to be enforced! The residuals fall below the defined criterion, but the solution continues until the "endTime" is reached (read from "controlDict"). Am I missing something on the proper way to declare the convergence criterion or something else is going on?

Attached you will find a link, leading to a test case that I prepared in order to check all these issues. I hope that it would be useful, if someone has the time to take a look on that!

Thank you in advance and I would be grateful for some feedback on all these issues!

Regards,

TEST CASE LINK:
https://my.pcloud.com/publink/show?c...cbMqSaJhTjzWSV

manalis July 20, 2017 05:50

I wasn't able to figure out any solution to the above mentioned issues until now, so I changed to the conjugate solver of the "foam-extend" version (v.4.0) named "conjugateHeatSimpleFoam". It seems to work properly and definitely it can handle non-conformal patches, since it includes classes for GGI (obviously with the necessary interpolation).

If someone finds any further clue about the "chtMultiRegionSimpleFoam" solver case, please post it here to be visible for anyone interested in this topic.

Regards,

Cagatayemre January 11, 2018 09:21

Temperature value is too high
 
2 Attachment(s)
Hello foamers, I am new to Openfoam. I am trying to solve steady conjugate heat transfer around and inside a cylinder. I checked my boundary conditions and thermophysical properties. But I get this nonsense result. Any help will be appreciated.

SamMallinson October 10, 2018 18:53

setting residual control in OpenFOAM-5.x/chtMultiRegionSimpleFoam
 
@manalis, change your residualControl entry to:


residualControl
{

p
{
tolerance 1e-6;
}
U
{
tolerance 1e-6;
}
h
{
tolerance 1e-6;
}
}


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