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/)
-   -   about the new heatExchangerEffectiveness source (https://www.cfd-online.com/Forums/openfoam-solving/125257-about-new-heatexchangereffectiveness-source.html)

vkrastev October 22, 2013 10:28

about the new heatExchangerEffectiveness source
 
Hi all,
I'm trying to get the new effectivenessHeatExchangerSource work properly, but till now I haven't succeded.
I have created a face zone at the heat exchanger inlet, changing the flipMap settings as posted here http://www.cfd-online.com/Forums/ope...map-flags.html, then edited the fvOptions file and added an effTable file in my case folder (see below).

faceZones
Code:

radiatore_inlet
{
    type faceZone;
faceLabels      List<label>
25309
(
70389
70401
...
...
2160521
2160527
)
;
flipMap        List<bool>
25309
(
1
1
1
...
...
1
1
1
)
;
}
)

fvOptions
Code:

thermal_radiatore_he
{
    type effectivenessHeatExchangerSource;
    active          true;
    selectionMode  cellZone;
    cellZone        radiatore;

    effectivenessHeatExchangerSourceCoeffs
    {
        secondaryMassFlowRate 0.694;
        secondaryInletT      368; //95°C
        primaryInletT        293;
        UName                U;
        TName                T;
        phiName              phi;
        faceZone              radiatore_inlet;
        outOfBounds          clamp;
        fileName              "effTableRadiatore_334";
    }
}

effTableRadiatore_334
Code:

(
            (0.285 \\primary-MRF
            (
                (0.694    0.911) \\(secondary-MRF  effectiveness)
                (1.389    0.947)
                (2.083    0.954)
                (2.778    0.960)
                (4.169    0.962)
            ))
           
            (0.571
            (
                (0.694    0.833)
                (1.389    0.900)
                (2.083    0.928)
                (2.778    0.932)
                (4.169    0.939)
            ))
           
            (0.856
            (
                (0.694    0.744)
                (1.389    0.836)
                (2.083    0.887)
                (2.778    0.888)
                (4.169    0.903)
            ))

            (1.142
            (
                (0.694    0.667)
                (1.389    0.771)
                (2.083    0.841)
                (2.778    0.848)
                (4.169    0.870)
            ))

            (1.427
            (
                (0.694    0.603)
                (1.389    0.713)
                (2.083    0.798)
                (2.778    0.813)
                (4.169    0.844)
            ))

            (1.713
            (
                (0.694    0.549)
                (1.389    0.660)
                (2.083    0.758)
                (2.778    0.781)
                (4.169    0.814)
            ))

            (1.998
            (
                (0.694    0.500)
                (1.389    0.612)
                (2.083    0.717)
                (2.778    0.746)
                (4.169    0.786)
            ))

            (2.283
            (
                (0.694    0.460)
                (1.389    0.566)
                (2.083    0.679)
                (2.778    0.711)
                (4.169    0.755)
            ))

            (2.569
            (
                (0.694    0.451)
                (1.389    0.526)
                (2.083    0.639)
                (2.778    0.676)
                (4.169    0.722)
            ))
);

But when the solver starts (chtMultiRegionSimpleFoam), I got the following error:
Code:

Time = 1


Solving for fluid region fluid
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.006681191, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.009447526, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.0003616165, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) in  "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::fv::effectivenessHeatExchangerSource::addSup(Foam::fvMatrix<double>&,  int) in  "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/lib/libfvOptions.so"
#4 
 in "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/bin/chtMultiRegionSimpleFoam"
#5 
 in "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/bin/chtMultiRegionSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 
 in "/home/vesselin/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc46DPOpt/bin/chtMultiRegionSimpleFoam"
Floating point exception (core dumped)

Any hints on what's going wrong?

Thanks in advance

V.

vkrastev October 24, 2013 06:14

So far, no one interested in this topic?

olivierG October 24, 2013 07:26

hello,

I am interested in this topic :)
About your error, this may due by the "\\" in your effTable.

By the way, what is the value in your effTable ?
The structure is:
Code:

((A((x y) (x y) ...)) B(((x y) (x y) ...)) ... )
But what is A, x and y ?

regards,
olivier

vkrastev October 24, 2013 18:43

Quote:

Originally Posted by olivierG (Post 458742)
hello,

I am interested in this topic :)
About your error, this may due by the "\\" in your effTable.

By the way, what is the value in your effTable ?
The structure is:
Code:

((A((x y) (x y) ...)) B(((x y) (x y) ...)) ... )
But what is A, x and y ?

regards,
olivier

Hi Olivier,

and thanks for joining the discussion. No, unforunately the "\\" are not responsible for the error (in the OpenFOAM file syntax, what comes after the "\\" is just interpreted as comment, like on the C++ language).
About your question, imagine a radiator crossed by air and a liquid coolant (just an example, it could be also gas-gas). If you assume the air as primary flow and the coolant as secondary flow, following your syntax you'll have that:

-A, B,.... are values of the primary mass flow;
-x,... are values of the secondary mass flow;
-y,... are heat exchanger effectiveness values corresponding to the primary and secondary mass flows combination.

So, basically, it is a two-dimensional table where both mass flows vary and the effectiveness changes accordingly. The effectiveness as a parameter is defined as the Qeff/Qmax ratio, where Qeff is the effective thermal power echanged for a given set of inlet mass flows, inlet temperatures and specific heats, and Qmax is the maximum theoretical exchangeable power for the same inlet conditions (Qmax=(mass flow*specific heat)_min * DeltaT_inlet). Usually this kind of data comes from experimental measurements on the heat exchanger in question.

The table syntax which I posted above is quite similar to the one proposed in the heatExchangerEffectiveness original source files, that is:

Code:

                          secondary MFR
                      |  0.1  0.2  0.3
                  -----+-----------------
                  0.02 |  A    B    C
      primary MFR 0.04 |  D    E    F
                  0.06 |  G    H    I


    Is specified by the following:

        (
            0.02
            (
                (0.1    A)
                (0.2    B)
                (0.3    C)
            ),
            0.04
            (
                (0.1    D)
                (0.2    E)
                (0.3    F)
            ),
            0.06
            (
                (0.1    G)
                (0.2    H)
                (0.3    I)
            )
        );

, but one strange thing is that the software complains about the "official" proposal, so I had to change it to let it start without errors. Now it does not complain about the table anymore but, as you see in my first post, the solver crashes at the first attempt of solving the enthalpy equation. I'm still not sure on what's going on, but If it's not the table (the fact that it is accepted doesn't mean that it is read properly) I suspect it could be the inlet faceZone specification (a specified faceZone is needed at the primary inlet of the heat exchanger, in order to let the solver integrate the simulated massflow).

Regards

V.

mturcios777 March 6, 2014 15:43

Thanks for documenting your findings, I am currently interested in creating an fvOption that is similar to this.

Did you figure out the problem? Did you run the case with the debug version of OpenFOAM, where you can see exactly where the error is occurring?


All times are GMT -4. The time now is 12:08.