paraview显示面场?


  • 网格教授 OpenFOAM教授 管理员

    有人知道么?面场能显示么?


  • OpenFOAM讲师

    前辈,貌似不行呢,我一直是手动打开看的😂


  • 网格教授 OpenFOAM教授 管理员

    嗯,但是网格上千个不好整了呢


  • 网格教授 OpenFOAM教授 管理员

    void Foam::QMOM::test()
    {
    	const labelUList& owner = mesh_.owner();
    	const labelUList& neighbour = mesh_.neighbour();
    
    	forAll(M_[0], cellI)
    	{
    		forAll(mesh_.cells()[cellI], faceI)   
    		{
    			if (cellI == 1897)
    			{
    				Info << "face" << faceI << nl;
    				label faceIndex = mesh_.cells()[cellI][faceI];
    				//Info << "mFlux[" << faceIndex << "] = " 
    				//		<< mFlux_[faceIndex].value() << nl;
    				forAll(mFlux_, kth)
    				{
    					Info << "mFlux[" << kth << "][" 
    						<< faceIndex << "] = " 
    						<< mFlux_[kth][faceIndex] << nl;
    				}
    			}
    		}
    	}
    }
    

    一个显示某网格(如第1897个网格点)周围的面(如6个面)的通量的代码。

    如下:

    PIMPLE: iteration 1
    MOMsolve() 
    momentsAdvection() function
    updateAbs function
    Wheeler function
    updateAbs function end
    KBFVM() FUNCTION 
    face0
    mFlux[0][3783] = -1.2927335654110290391e-12
    mFlux[1][3783] = -6.2675976060777894205e-12
    mFlux[2][3783] = -3.1150947399844006554e-11
    mFlux[3][3783] = -1.5863902768703573911e-10
    mFlux[4][3783] = -8.2750268353901142759e-10
    mFlux[5][3783] = -4.4202305898578507575e-09
    mFlux[6][3783] = -2.417473810022032185e-08
    mFlux[7][3783] = -1.3535140721940442922e-07
    face1
    mFlux[0][3784] = 2.0540870520051721362e-13
    mFlux[1][3784] = 9.4661825056687303207e-13
    mFlux[2][3784] = 4.4532871356728447274e-12
    mFlux[3][3784] = 2.1369999282078349297e-11
    mFlux[4][3784] = 1.0452769480664259678e-10
    mFlux[5][3784] = 5.2076058382076055416e-10
    mFlux[6][3784] = 2.6403668330037581177e-09
    mFlux[7][3784] = 1.3610985929982985127e-08
    face2
    mFlux[0][11360] = -0.38831761037105733125
    mFlux[1][11360] = 3.2471357929156595401e-12
    mFlux[2][11360] = 0.055793628070796436047
    mFlux[3][11360] = 8.30049086908404522e-11
    mFlux[4][11360] = 1.4292276668538757853e-05
    mFlux[5][11360] = 7.1461383336000636559e-05
    mFlux[6][11360] = 0.00036534632227100779416
    mFlux[7][11360] = 0.0019098593165646248534
    face3
    mFlux[0][16315] = 5.2242945423600630761
    mFlux[1][16315] = 1.101005821401192256e-10
    mFlux[2][16315] = 0.31179646759308882187
    mFlux[3][16315] = 2.812383025709799438e-09
    mFlux[4][16315] = 1.4292279304637762273e-05
    mFlux[5][16315] = 7.1433737066938304697e-05
    mFlux[6][16315] = 0.00036507857573279831271
    mFlux[7][16315] = 0.0019078661663797318558
    face4
    mFlux[0][3604] = 6.9764003936297054674e-12
    mFlux[1][3604] = 3.4017174538427634926e-11
    mFlux[2][3604] = 1.6992537663665707908e-10
    mFlux[3][3604] = 8.693051567457588884e-10
    mFlux[4][3604] = 4.5534209594944540047e-09
    mFlux[5][3604] = 2.4416268967863339806e-08
    mFlux[6][3604] = 1.340108550200319568e-07
    mFlux[7][3604] = 7.5279189328388737134e-07
    face5
    mFlux[0][3781] = -9.33250737219599897e-12
    mFlux[1][3781] = -4.5911180782797612225e-11
    mFlux[2][3781] = -2.3141179782345137439e-10
    mFlux[3][3781] = -1.1946980508076885345e-09
    mFlux[4][3781] = -6.3157644055822882014e-09
    mFlux[5][3781] = -3.4182357847142154226e-08
    mFlux[6][3781] = -1.8937287564175264068e-07
    mFlux[7][3781] = -1.0737815840220180914e-06
    kth is 0
    gMin is 4.8282703298717213403e-05
    kth is 1
    gMin is 4.8215082927350118335e-05
    kth is 2
    gMin is 4.8203426534192527083e-05
    kth is 3
    gMin is 4.8197530295908814742e-05
    deltaT is 5.000000000000000409e-06
    SetdeltaT  END
    KBFVM() FUNCTION END 
    momentsAdvection() function END
    updateAbs function
    Wheeler function
    1897's b[i] < 0
    m = 8.9981758148512276923e-06
    m = 4.1459899559787042548e-05
    m = 0.00019500283102905703906
    m = 0.00093553135820788324833
    m = 0.0045747020117296623154
    m = 0.022783875013194655745
    m = 0.11547491828732039942
    m = 0.59499954912512731386
    neigh cells are 4(1807 1896 1898 1987)
    
    
    --> FOAM FATAL ERROR: 
    
    
        From function b < 0
        in file momentsInversion/wheeler/wheeler.C at line 91.
    
    FOAM exiting
    
    
    

    我这一个月,一直在和1897网格单元作斗争


  • 网格教授 OpenFOAM教授 管理员

    um. I dont understand. 我这是个2为网格,每个网格单元应该有4个内部面面,但是两个empty边界面上却具有通量?