Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    solver中用p和T更新h

    OpenFOAM
    2
    3
    2041
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • qjh888
      qjh888 last edited by

      各位好,

      最近在修改一个solver.
      原来的solver中,是用:

          volScalarField& h = thermo.h();
      

      建立了h场,然后在求解前后:

      U.correctBoundaryConditions();
      p.correctBoundaryConditions();
      h.correctBoundaryConditions();
      
      SOLVING....
      
      U.correctBoundaryConditions();
      p.correctBoundaryConditions();
      h.correctBoundaryConditions();
      thermo.correct();
      

      由于此求解器在h.correctBoundaryConditions();出现了问题,我想能先组建T场,然后再用T场去更新thermo,然后再更新h场?我想的是如下:

          Info<< "Allocating field T\n" << endl;
          volScalarField T
          (
              IOobject
              (
                  "T",
                  runTime.timeName(),
                  mesh,
                  IOobject::MUST_READ,
                  IOobject::AUTO_WRITE
              ),
              thermo.T()
          );
      U.correctBoundaryConditions();
      p.correctBoundaryConditions();
      T.correctBoundaryConditions();
      thermo.correct();
      
      
      SOLVING....
      U.correctBoundaryConditions();
      p.correctBoundaryConditions();
      h.correctBoundaryConditions(); //先更新h,
      thermo.correct();                      //用更新后的h去更新thermo
      T.correctBoundaryConditions();//再更新T
      
      

      现在如果按照我这样做的话,还是有问题的,不知道问题错在哪儿?
      谢谢各位 !

      Janry

      Turbomachinery Enginee

      1 Reply Last reply Reply Quote
      • C
        CFD中文网 last edited by

        没有get到你的点:kiss_big:

        CFD中国标准用户测试帐号
        目前由徐笑笑登录

        1 Reply Last reply Reply Quote
        • qjh888
          qjh888 last edited by

          这个是foam-extend 中的一个bug. 我已经repot了。
          请点击这儿->Bug#308
          有兴趣的朋友可以看看

          Turbomachinery Enginee

          1 Reply Last reply Reply Quote
          • First post
            Last post

          CFD中文网 | 东岳流体 | 京ICP备15017992号-2
          论坛登录问题反馈可联系 li.dy@dyfluid.com