OpenFOAM如何输出场的最小值这个文件?



  • 我想监测温度场的最小值随时间的变化情况。能否直接有工具输入最小值的文件?
    我用的OpenFOAM5.x,尝试采用cellSource来输出,将functions加入至controlDict文件中。但运行计算后并没有输出结果,百思不得其解。
    您的任何建议,都万分感谢!

    functions
    {
        cellSource1
        {
            type              cellSource;
            function          ObjectLibs ("libfieldFunctionObjects.so");
            enabled           true;
            outputControl     outputTime;
            log               true;
            valueOutput       true;
            source            all;
            operation         min;
            fields
            (
                T
            );
        }
    }
    


  • 你看看算例文件夹下postProcess文件夹下输出没有



  • @东岳 啊谢谢回复!我计算后,算例文件夹下没有postProcess文件,按理说应该有的吧,不知道您有什么建议。results.JPG



  • 把最开始计算的5个时间步log贴出来看看?



  • @东岳 谢谢东岳老师能回复我,开心。下面是你说的时间步log吧。我设的时间步长是240s。

    Create time
    
    Create mesh for time = 0
    
    SIMPLE: convergence criteria
        field P	 tolerance 1e-05
        field U	 tolerance 1e-05
        field nuTilda	 tolerance 1e-05
    Reading field p
    Reading transportProperties
    Calculating 
    Time = 240
    Calculating the Saturation
    Calculating the pressure head
    DICPCG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
    Calculating the velocity
    Calculating lamT
    DILUPBiCG:  Solving for T, Initial residual = 0.550522, Final residual = 8.33185e-07, No Iterations 48
    ExecutionTime = 34.74 s  ClockTime = 41 s
    
    Time = 480
    
    
    Calculating the Saturation
    
    
    Calculating the pressure head
    
    DICPCG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
    
    Calculating the velocity
    
    
    Calculating lamT
    
    DILUPBiCG:  Solving for T, Initial residual = 0.0427664, Final residual = 8.02042e-07, No Iterations 45
    ExecutionTime = 37.47 s  ClockTime = 44 s
    
    Time = 720
    
    
    Calculating the Saturation
    
    
    Calculating the pressure head
    
    DICPCG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
    
    Calculating the velocity
    
    
    Calculating lamT
    
    DILUPBiCG:  Solving for T, Initial residual = 0.0180619, Final residual = 8.65532e-07, No Iterations 41
    ExecutionTime = 39.39 s  ClockTime = 46 s
    
    Time = 960
    
    
    Calculating the Saturation
    
    
    Calculating the pressure head
    
    DICPCG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
    
    Calculating the velocity
    
    
    Calculating lamT
    
    DILUPBiCG:  Solving for T, Initial residual = 0.0128672, Final residual = 9.31796e-07, No Iterations 39
    ExecutionTime = 40.97 s  ClockTime = 47 s
    
    Time = 1200
    
    
    Calculating the Saturation
    
    
    Calculating the pressure head
    
    DICPCG:  Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
    
    Calculating the velocity
    
    
    Calculating lamT
    
    DILUPBiCG:  Solving for T, Initial residual = 0.0098683, Final residual = 8.24145e-07, No Iterations 38
    ExecutionTime = 42.45 s  ClockTime = 49 s
    


  • 你自己写的求解器?看起来你这个求解器没运行function



  • 第一次发帖求助,就能得到东岳老师的回复,真的非常感谢!
    (1)是根据laplacianFOAM稍微改了下的求解器,但是如果是探针probe的话是可以运算出结果的。那cellSource不运行function的话,我需要怎么改下求解器吗
    (2)还想请教下,算例边界条件设置的问题,左图是压力,右图是温度。
    左图压力上下边界条件均为zero flux,右侧问题上下右边界条件为zero conductive flux。对于zero flux和zero conductive flux,边界条件是不是应设置为symmetryPlane,还是zeroGradient。我计算出的结果差别很大,不知道问题出在哪里,所以想确定下是不是我边界条件设置的不对。
    case.JPG



  • @东岳 第一次发帖求助,就能得到东岳老师的回复,真的非常感谢!
    (1)是根据laplacianFOAM稍微改了下的求解器,但是如果是探针probe的话是可以运算出结果的。那cellSource不运行function的话,我需要怎么改下求解器吗
    (2)还想请教下,算例边界条件设置的问题,左图是压力,右图是温度。
    左图压力上下边界条件均为zero flux,右侧问题上下右边界条件为zero conductive flux。对于zero flux和zero conductive flux,边界条件是不是应设置为symmetryPlane,还是zeroGradient。我计算出的结果差别很大,不知道问题出在哪里,所以想确定下是不是我边界条件设置的不对。
    case.JPG


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2