大涡模拟哪种差值格式收敛性最好啊? Gamma ? vanLee?
mark
帖子
-
-
这样设置好像不行啊@cfd-china
-
PIMPLE: iteration 1
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
#4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensioned<double> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#6 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(double const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7 Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const at ??:?
#8 ? at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? at ??:? -
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //dimensions [1 -1 -2 0 0 0 0];
internalField uniform 3e+06;
boundaryField
{
INLET
{
type fixedValue;
value uniform 10e+06;
}WALL { type zeroGradient; } OUTLET { type waveTransmissive; value uniform 3e+06; field p; gamma 1.17; phi phi; rho rho; psi psi; lInf 0.05; fieldInf 3e+06; }
}
-
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //dimensions [1 -1 -2 0 0 0 0];
internalField uniform 3e+06;
boundaryField
{
INLET
{
type calculated;
}WALL { type zeroGradient; } OUTLET { type calculated; }
}
// ************************************************************************* //
-
This boundary condition
-
速度和压力设置不对?
-
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.fuel; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { INLET { type fixedValue; value uniform 1; } WALL { type zeroGradient; } OUTLET { type zeroGradient; } } // ************************************************************************* //
-
/*------------none--------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 3e+06; boundaryField { INLET { type fixedValue; value uniform 100e+06; } WALL { type zeroGradient; } OUTLET { type zeroGradient; } } // ************************************************************************* //
-
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 3e+06; boundaryField { INLET { type fixedValue; value uniform 100e+6; } WALL { type zeroGradient; } OUTLET { type zeroGradient; } } // ************************************************************************* //
-
速度
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { INLET { type zeroGradient; } WALL { type zeroGradient; } OUTLET { type zeroGradient; } } // ************************************************************************* //
-
大口进,小口出 -
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { alpha.fuel { nAlphaCorr 1; nAlphaSubCycles 1; cAlpha 1; } ".*(rho|rhoFinal)" { solver diagonal; } pcorr { solver GAMG; preconditioner { preconditioner GAMG; tolerance 1e-05; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-05; relTol 0; maxIter 100; } p_rgh { solver GAMG; tolerance 1e-07; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } p_rghFinal { solver GAMG; preconditioner { preconditioner GAMG; tolerance 1e-07; relTol 0; nVcycles 2; smoother GaussSeidel; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-07; relTol 0; maxIter 20; } "(U|T|k|B|nuTilda).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-08; relTol 0; } "e.*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; minIter 1; } } PIMPLE { momentumPredictor yes; transonic yes; nOuterCorrectors 5; nCorrectors 1; nNonOrthogonalCorrectors 2; residualControl { U { tolerance 1e-07; relTol 0; } p_rgh { tolerance 1e-07; relTol 0; } T { tolerance 1e-07; relTol 0; } k { tolerance 1e-07; relTol 0; } } relaxtionFactors { fields { p_rgh 0.4; p_rghFinal 1; } equations { "(U|T|k|B|nuTilda)" 0.4; "(U|T|k|B|nuTilda)Final" 1; } } // ************************************************************************* //
-
*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(rhoPhi,U) Gauss upwind; div(phi,thermo:rho.fuel) Gauss upwind; div(phi,thermo:rho.air) Gauss upwind; div(rhoPhi,T) Gauss upwind; div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear uncorrected; } interpolationSchemes { default linear; } snGradSchemes { default uncorrected; } fluxRequired { default no; p_rgh; pcorr; } // ************************************************************************* //
-
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application myFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1.8e-04; deltaT 1e-09; writeControl adjustableRunTime; writeInterval 1e-07; purgeWrite 0; writeFormat binary; writePrecision 8; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1e-09; // ************************************************************************* //
-
每个网格内的压力不一样,怎样使源项在网格中不同,而不是用整体的源项呢?
-
2 sp su 怎样赋值给每个网格,而不是整体的源项?
-
1 , sp su 该怎样修改?
-
-
-
{ word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); surfaceScalarField phir("phir", phic*interface.nHatf()); Pair<tmp<volScalarField> > vDotAlphal = twoPhaseProperties->vDotAlphal(); const volScalarField& vDotcAlphal = vDotAlphal[0](); const volScalarField& vDotvAlphal = vDotAlphal[1](); const volScalarField vDotvmcAlphal(vDotvAlphal - vDotcAlphal); for (int gCorr=0; gCorr<nAlphaCorr; gCorr++) { volScalarField::DimensionedInternalField Sp ( IOobject ( "Sp", runTime.timeName(), mesh ), vDotvmcAlphal ); volScalarField::DimensionedInternalField Su ( IOobject ( "Su", runTime.timeName(), mesh ), // Divergence term is handled explicitly to be // consistent with the explicit transport solution vDotcAlphal //divU*min(alpha1, scalar(1)) ); forAll(dgdt, celli) { if (dgdt[celli] >= 0.0 ) { Su[celli] += (dgdt[celli]*alpha1[celli]*alpha2[celli]); } else { Sp[celli] += (dgdt[celli]*alpha2[celli]); } if (divU[celli] >= 0.0 ) { Su[celli] += alpha1[celli]*divU[celli]; } else { Sp[celli] += divU[celli]; } } surfaceScalarField phiAlpha1 ( fvc::flux ( phi, alpha1, alphaScheme ) + fvc::flux ( -fvc::flux(-phir, alpha2, alpharScheme), alpha1, alpharScheme ) ); MULES::explicitSolve ( geometricOneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0 ); surfaceScalarField rho1f(fvc::interpolate(rho1)); surfaceScalarField rho2f(fvc::interpolate(rho2)); rhoPhi = phiAlpha1*(rho1f - rho2f) + phi*rho2f; alpha1 = min(max(alpha1, scalar(0)), scalar(1)); alpha2 = scalar(1) - alpha1; } Info<< "Liquid phase volume fraction = " << alpha1.weightedAverage(mesh.V()).value() << " Min(" << alpha1.name() <<") = " << min(alpha1).value() << " Min(" << alpha2.name() <<") = " << min(alpha2).value() << endl; }
-
-
怎样在主程序中添加correct( ); 来在更新类中的 rho1()rho2() p()
-
在程序中更新rho1 ,rho2 p 代码怎样实现呢?
-
-
-
@cfd-china 求解器大于200K啊,上传不了,给个邮箱啊?
-
:crying:
-
是自己的求解器,跑了几个小时才出问题,是不是该检查算例呢?
-
程序进行 Time = 2.708e-06, 这种错误是出在哪里呢? 边界条件?还是程序?@wwzhao @cfd-china
-
-
MULES: Solving for alpha.fuel Liquid phase volume fraction = 0.78646411 Min(alpha.fuel) = 0 Min(alpha.vapor) = 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for T, Initial residual = 0.0043509939, Final residual = 5.4162916e-12, No Iterations 2 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::PengRobinsonGas<Foam::specie>::Z(double, double) const at ??:? #4 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::PengRobinsonGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:? #5 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::PengRobinsonGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:? #6 Foam::twoPhaseMixtureThermo::correct() at ??:? #7 ? at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 ? at ??:?
-
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{INLET
{
type fixedValue;
value uniform (0 0 0);
}WALL { type fixedValue; value uniform (0 0 0); } OUTLET { type pressureInletOutletVelocity; inletValue uniform (0 0 0); value uniform (0 0 0); }
}
// ************************************************************************* //
```
这样写对不对? -
初始时刻rho2 为0 ,rho2蒸汽相是由于相变产生,解释的通?
-
createFields中是从0文件夹获取初始密度,后面通过mixture.thermo().rho()赋值(通过状态方程求得rho1 rho2) 这样是否可行呢? @cfd-china
-
可压缩,0时刻,U的大小怎样确定?
-
另一个类中需要密度,不读取不行吧?
-
IOOBJECT:MUST_READ可以指定为NO_READ 意思是不需要读取case里面两个密度?
-
两部分温度压力不同该怎样设置呢? -
变量u 带成员函数指针, p_rgh 没有,区别在什么地方啊? -
volScalarField alpha10("alpha10", alpha1);
这句 代码怎样理解呢?有知道的吗 -
向x轴正方向运动,看来我设置对了:sunglasses: thanks
-
从X轴进去,g这样设置对吧?
-
能否留下联系方式,我也用到interphasechangefoam
-
@Aeronastro 应该也可以的,刚才我忘记wmake那个库文件,直接wmake求解器了,先这样算着,我改天再试一下
-
@Aeronastro
防止分母为0 ,我设置一个dimensionedScalar small_ ,
small = 1.0e-36 这样一个非常小的数可以吗?
volScalarField alphalCoeff(1.0/rho1() - alpha1_*(1.0/rho1() - 1.0/(rho2() + small())));
这样就可以算了:sunglasses: 请指教.. -
-
Create time Create mesh for time = 0 Reading g PIMPLE: Operating solver in PISO mode Reading field p_rgh Reading field U Reading/calculating face flux field phi Constructing twoPhaseMixtureThermo Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport sutherland; thermo hConst; equationOfState PengRobinsonGas; specie specie; energy sensibleEnthalpy; } Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport sutherland; thermo hConst; equationOfState PengRobinsonGas; specie specie; energy sensibleEnthalpy; } Reading thermophysical properties --> FOAM Warning : From function GeometricField<Type, PatchField, GeoMesh>::readIfPresent() in file /opt/openfoam240/src/OpenFOAM/lnInclude/GeometricField.C at line 108 read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED suggests that a read constructor for field rho1 would be more appropriate. --> FOAM Warning : From function GeometricField<Type, PatchField, GeoMesh>::readIfPresent() in file /opt/openfoam240/src/OpenFOAM/lnInclude/GeometricField.C at line 108 read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED suggests that a read constructor for field rho2 would be more appropriate. Creating phaseChangeTwoPhaseMixture Selecting phaseChange model SchnerrSauer Calculating field g.h Selecting turbulence model type LESModel Selecting LES turbulence model oneEqEddy Selecting LES delta type smooth Selecting LES delta type cubeRootVol oneEqEddyCoeffs { ce 1.048; Prt 1; ck 0.094; } Creating field kinetic energy K No finite volume options present Courant Number mean: 4.9504176e-07 max: 1.9500023e-05 Starting time loop Courant Number mean: 4.9014036e-07 max: 1.9306953e-05 deltaT = 9.9009901e-09 Time = 9.90099e-09 PIMPLE: iteration 1 --> FOAM FATAL ERROR: LHS and RHS of + have different dimensions dimensions : [1 -3 0 0 0 0 0] + [0 0 0 0 0 0 0] From function operator+(const dimensionSet&, const dimensionSet&) in file dimensionSet/dimensionSet.C at line 478. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::operator+(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:? #3 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator+<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensioned<double> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator+<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, double const&) at ??:? #5 Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const at ??:? #6 ? at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 ? at ??:? 已放弃 (核心已转储) zhubin@zhubin-System-Product-Name:~/OpenFOAM/zhubin-2.4.0/run/tutorials/myFoam$
-
@Aeronastro @administrators 试了一下,好像不行哦
-
很感谢!
差值格式
calculated 边界条件怎么用?有谁知道啊?
calculated 边界条件怎么用?有谁知道啊?
calculated 边界条件怎么用?有谁知道啊?
calculated 边界条件怎么用?有谁知道啊?
calculated 边界条件怎么用?有谁知道啊?
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
射流算例速度发散了,有谁知道怎么解决吗
源项与压力耦合的时候,sp su怎样设置?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
MULES方法求解alpha方程出错,有谁知道怎样修改吗?
怎样在主程序中添加correct() 函数?
怎样在主程序中添加correct() 函数?
怎样在主程序中添加correct() 函数?
怎样在主程序中添加correct() 函数?
我自己写了一个求解器,模拟不出现象,谁能帮我看一下
我自己写了一个求解器,模拟不出现象,谁能帮我看一下
运行出错..有知道的吗
运行出错..有知道的吗
运行出错..有知道的吗
运行出错..有知道的吗
压力入口边界条件
--> FOAM Warning :
--> FOAM Warning :
压力入口边界条件
--> FOAM Warning :
--> FOAM Warning :
case设置,怎样解决模型中不同部分压力温度等条件不同问题
fvSolution问题
代码问题
g 重力加速度怎样设置?
g 重力加速度怎样设置?
急求,用interphasechangefoam加LES模型求解发散的问题
LHS and RHS of + have different dimensions
LHS and RHS of + have different dimensions
--> FOAM Warning :
LHS and RHS of + have different dimensions
LHS and RHS of + have different dimensions
LHS and RHS of + have different dimensions