CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] funkydoCalc issue with snGrad (https://www.cfd-online.com/Forums/openfoam-community-contributions/176302-funkydocalc-issue-sngrad.html)

manuc August 15, 2016 11:06

funkydoCalc issue with snGrad
 
Hello

I have n issue with snGrad usage with funkydocalc.

With swak4foam

I gave :

Code:

functions(
 
  NusseltNumber_hot
  {
    type          patchExpression;
    outputControl  timeStep;
    outputInterval 1;
        patches (
                w_l
              );
    verbose true;
        variables (
                "Tsat=300.1;"
                "ln2D=3.065;"      //length(.08)/k(.0261) 
              );
    expression "ln2D*snGrad(T)/(T-Tsat)";
        accumulations (
                    average
            ); 
  }
);

------------------------------------------------------

This gave me a Nusselt No. of 56.02 (neglect scaling)
.

With all data in disk I tried to obtian the same using funkyDoCalc as:

Code:

    NusseltNumber_hot
  {
    valueType                        patch;
        patchName                        w_l;
        variables ( 
                        "Tsat=300.1;"
                        "ln2D=3.065;"      //length(.08)/k(.0261) 
        );
    expression                      "ln2D*snGrad(T)/(T-Tsat)";
        accumulations (
                    max
                  ); 
  }

-----------------------------------------------------------
Which is giving me 0 as output for max/min/average

I read in:
https://sourceforge.net/p/openfoam-e...2.1_v2.x/tree/

that the snGrad doesnt work when data is in disc and needs to be temporarily loaded. Could anyone explain on what to be done

wyldckat January 1, 2018 19:49

Quote:

Originally Posted by manuc (Post 614108)
that the snGrad doesnt work when data is in disc and needs to be temporarily loaded. Could anyone explain on what to be done

Quick answer, although really late by now: according to the information you've found, you must use this while the solver is running and cannot use it with funkyDoCalc.

gschaider January 2, 2018 11:00

Quote:

Originally Posted by wyldckat (Post 676639)
Quick answer, although really late by now: according to the information you've found, you must use this while the solver is running and cannot use it with funkyDoCalc.

Yep. Reason is that for such calculations to work correctly funkyDoCalc would have to call correctBoundaryConditions() on loaded fields. And that has the strong potential to crash if a boundary condition needs another field in memory and doesn't find it.


All times are GMT -4. The time now is 16:00.