1064168551
帖子
-
OpenFOAM libtorch tutorial step by step -
OpenFOAM libtorch tutorial step by step@李东岳 在 OpenFOAM外挂libtorch 中说:
http://dyfluid.com/download.html 我这面有全系列的,里面gcc也可以切换。
你用你的老版本也行,老版本要更新gcc。
不管咋的你可以试试,有问题反馈我我协助谢谢东岳老师,我的伴随拓扑优化是用老版本of写的,我试着更新gcc后编译一下,感谢感谢
-
OpenFOAM libtorch tutorial step by step@李东岳 好的谢谢老师
-
OpenFOAM libtorch tutorial step by step@1064168551 ![44c95d02-bafe-4b04-8ecb-10603fb0e805-image.png](/assets/uploads/files/17162 81973254-44c95d02-bafe-4b04-8ecb-10603fb0e805-image.png) 这里截了下部分报错信息
-
OpenFOAM libtorch tutorial step by step东岳老师您好,我正在做基于伴随的流热力拓扑优化,想用神经网络预测流体伴随方程解,在配置您说的这个libtorch时编译torchFoam失败了(我的环境变量都按您说的配置好了),我用的是您配置的openfoam5x的虚拟机,请问of版本不兼容吗?您用的是哪个版本of配置的呢?
-
openfoam自定义边界条件编译时报错,恳请论坛内各位老师解惑报错的自定义边界如下,如图所示报错为:“‘incompressible’ does not name a type“,恳请论坛内各位老师解惑
/---------------------------------------------------------------------------\\ / F ield OpenFOAM: The Open Source CFD Toolbox \ / O peration \ / A nd Copyright (C) 2011 OpenFOAM Foundation \/ M anipulation
License
This file is part of OpenFOAM.OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
*---------------------------------------------------------------------------*/
#include "adjointOutletPressureHeatFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "RASModel.H"// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::adjointOutletPressureHeatFvPatchScalarField::
adjointOutletPressureHeatFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchScalarField(p, iF)
{}Foam::adjointOutletPressureHeatFvPatchScalarField::
adjointOutletPressureHeatFvPatchScalarField
(
const adjointOutletPressureHeatFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchScalarField(ptf, p, iF, mapper)
{}Foam::adjointOutletPressureHeatFvPatchScalarField::
adjointOutletPressureHeatFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedValueFvPatchScalarField(p, iF)
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}Foam::adjointOutletPressureHeatFvPatchScalarField::
adjointOutletPressureHeatFvPatchScalarField
(
const adjointOutletPressureHeatFvPatchScalarField& tppsf,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchScalarField(tppsf, iF)
{}// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::adjointOutletPressureHeatFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}const fvsPatchField<scalar>& phip = patch().lookupPatchField<surfaceScalarField, scalar>("phi"); const fvsPatchField<scalar>& phiap = patch().lookupPatchField<surfaceScalarField, scalar>("phib"); const fvPatchField<vector>& Uap = patch().lookupPatchField<volVectorField, vector>("Ub"); const dictionary& transportProperties = db().lookupObject<IOdictionary>("transportProperties"); dimensionedScalar nu(transportProperties.lookup("nu")); scalarField Up_n = phip / patch().magSf();//Primal scalarField Uap_n = phiap / patch().magSf();//Adjoint const incompressible::RASModel& rasModel = db().lookupObject<Foam::incompressible::RASModel>("RASProperties"); scalarField nueff = rasModel.nuEff()().boundaryField()[patch().index()]; const scalarField& deltainv = patch().deltaCoeffs(); // distance^(-1) scalarField Uaneigh_n = (Uap.patchInternalField() & patch().nf()); //operator ==((Up_n * Uap_n) +2*nu.value()*deltainv*(Uap_n-Uaneigh_n));
operator ==((Up_n * Uap_n) +2*nueff.value()deltainv(Uap_n-Uaneigh_n));
fixedValueFvPatchScalarField::updateCoeffs();
}
void Foam::adjointOutletPressureHeatFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
writeEntry("value", os);
}// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
adjointOutletPressureHeatFvPatchScalarField
);
incompressible
}
-
open foam求解浓度的对流扩散如图,我想求解T的场,即第二张云图,但是求解出的场结果不符合物理意义,求解的方程如图1,DT和速度场如第三张和第一张云图所示,管道的右侧区域模拟的是固体,正常应该在T的场图中为0,但是结果却并非如此,求问造成这种现象的原因
-
defaultFaces面@李东岳 谢谢李老师,我是两个block对应一个block会出问题,把右边的大block改成两个就不会出现defaultfaces了
-
defaultFaces面请问我这个为什么blockMesh给我自动生成了两个defaultFaces面,这两个面是我不需要的
-
openfoam的twomixingLiquidfoam求解器改成稳态求解器@李东岳 好的,谢谢老师,我目前主要是想对多组分气体(氧气和氮气)的稳态流动扩散进行求解,想着基于twomixingLiquidfoam简单修改修改,因为我对MULES研究的不多,如果是稳态计算的话,我可否直接在相方程里面添加对流项fvm::div(phi,alpha1),将求解alpha1的方程写成:
fvm::div(phi,alpha1) - fvm::laplacian
(
volScalarField("Dab", Dab + alphatab*turbulence->nut()),
alpha1
)
从而删去MULES部分呢? -
openfoam的twomixingLiquidfoam求解器改成稳态求解器各位老师好,我最近想把openfoam的twomixingLiquidfoam求解器改成稳态求解器,不知道怎样实现最简单?我的初步想法是把求解速度场和压力场的pimple求解器先改成simple求解器,然后把求解相alpha
1的方程中非稳态项(t的导数项)去掉,这样做可以吗?MULES的相关求解部分需要进行修改吗?或者各位老师有什么更简便的建议和方法? -
twoLiquidMixingFoam解析@李东岳 好的谢谢老师
-
turbulence->divdDevReff(U)@xpqiu 1064168551@qq.com,谢谢老师!!!
-
twoliquidmixingFoam扩散方程里面为啥没有对流项有个问题想要请教下各位老师,如图,twoliquidmixingFoam求解器里面这个扩散方程里面为啥没有对流项fvm::div(phi,alpha)?
-
twoLiquidMixingFoam解析@李东岳 好的谢谢李老师,我其实就是有几个小问题有些困惑,您方便的话把以前的旧版本或者没整理的手稿借我看看也万分感谢
-
twoLiquidMixingFoam解析请问哪位有东岳老师的twoLiquidMixingFoam解析,方便发我一下嘛,qq邮箱:1064168551@qq.com,感谢@李东岳
-
twoLiquidMixingFoam解析请问哪位有东岳老师的twoLiquidMixingFoam解析,方便发我一下嘛,qq邮箱:1064168551@qq.com,感谢