@李东岳 感谢李老师!原来没有特意写出来的都是同一个
Rachel0096
帖子
-
of2.3.x的reactingFoam里的rhoEqn.H对应的代码是什么? -
of2.3.x的reactingFoam里的rhoEqn.H对应的代码是什么?我使用的是openfoam2.3.x,其reactingFoam目录是这样的:
其中没有rhoEqn.H,但是代码里有rhoEqn.H:
这样的话,我要怎么去找,它这里引用的rhoEqn.H在openfoam中的哪里? -
oepnFoam如何初始化非均匀内部标量场@xuqiming 论坛里有个名为“【分享+搬运】自定义非均匀inlet U”的帖子,或许可以帮到你
-
cantera计算一维对冲火焰,grid=0时与边界设置条件相差大。是想用cantera算一维火焰做FGM表,用在openfoam计算里ToT
-
cantera计算一维对冲火焰,grid=0时与边界设置条件相差大。我参考cantera官网示例中的diffusion_flame_batch.py,设置一批应变率变化时的一维对冲火焰解。通过反复调用前一计算结果作为初始解,来逐渐增加或降低应变率,从而得到计算结果。当我按照代码设置应变率上升时(即和源代码中一样设置strain_factor = 1.25),边界结果无明显问题。但当我设置应变率下降时(将strain_factor改为0.8),在燃料侧的grid=0处,其结果中的组分组成随应变率下降而逐渐偏离边界条件。我的燃料设置为Y_O2:0.2,Y_NH3:0.1417,Y_N2:0.6583。取应变率下降循环第50次的结果而言,grid=0处的O2仅为0.15左右,NH3也偏差很大。这个可能是什么原因引起的?
示例中的源代码部分如下:
# PART 3: STRAIN RATE LOOP # Compute counterflow diffusion flames at increasing strain rates at 1 bar # The strain rate is assumed to increase by 25% in each step until the flame is # extinguished strain_factor = 1.25 # Exponents for the initial solution variation with changes in strain rate # Taken from Fiala and Sattelmayer (2014) exp_d_a = - 1. / 2. exp_u_a = 1. / 2. exp_V_a = 1. exp_lam_a = 2. exp_mdot_a = 1. / 2. # Restore initial solution file_name, entry = names("initial-solution") f.restore(file_name, name=entry) # Counter to identify the loop n = 0 # Do the strain rate loop while np.max(f.T) > temperature_limit_extinction: n += 1 print('strain rate iteration', n) # Create an initial guess based on the previous solution # Update grid f.flame.grid *= strain_factor ** exp_d_a normalized_grid = f.grid / (f.grid[-1] - f.grid[0]) # Update mass fluxes f.fuel_inlet.mdot *= strain_factor ** exp_mdot_a f.oxidizer_inlet.mdot *= strain_factor ** exp_mdot_a # Update velocities f.set_profile('velocity', normalized_grid, f.velocity * strain_factor ** exp_u_a) f.set_profile('spread_rate', normalized_grid, f.spread_rate * strain_factor ** exp_V_a) # Update pressure curvature f.set_profile('lambda', normalized_grid, f.L * strain_factor ** exp_lam_a) try: # Try solving the flame f.solve(loglevel=0)
-
Floating point exception (core dumped)已解决
-
Floating point exception (core dumped)当我使用原本的网格和0设置时,仅更换为新的机理(gri3.0,原机理是一个氢气的机理),此时会出现一些“attempt to use janafThermo<EquationOfState> out of temperature range 300 -> 3000; T = 298K”的warning,但是可以正常进行计算。
-
Floating point exception (core dumped)我在使用一个他人编写的of2.3.x上的求解器,使用其随带发来的算例可以正常运行。之后,主要对0、polymesh和机理进行了更换,尝试计算自己的算例,但是在开始计算时出现报错,看上去是在读取机理时出现问题,想请教各位老师,问题是出在哪里?
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading g Creating reaction model Selecting chemistry type { chemistrySolver EulerImplicit; chemistryThermo psi; } Selecting thermodynamics package { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } Selecting chemistryReader foamChemistryReader #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 in "/lib64/libc.so.6" #3 Foam::DimensionedField<double, Foam::volMesh>::operator/=(Foam::DimensionedField<double, Foam::volMesh> const&) at ??:? #4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator/=(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #5 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::correctMassFractions() at ??:? #6 Foam::multiComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::multiComponentMixture(Foam::dictionary const&, Foam::List<Foam::word> const&, Foam::HashPtrTable<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> >, Foam::word, Foam::string::hash> const&, Foam::fvMesh const&) at ??:? #7 Foam::reactingMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::reactingMixture(Foam::dictionary const&, Foam::fvMesh const&) at ??:? #8 Foam::heThermo<Foam::psiReactionThermo, Foam::SpecieMixture<Foam::reactingMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::heThermo(Foam::fvMesh const&, Foam::word const&) at ??:? #9 Foam::psiReactionThermo::addfvMeshConstructorToTable<Foam::hePsiThermo<Foam::psiReactionThermo, Foam::SpecieMixture<Foam::reactingMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:? #10 Foam::autoPtr<Foam::psiReactionThermo> Foam::basicThermo::New<Foam::psiReactionThermo>(Foam::fvMesh const&, Foam::word const&) at ??:? #11 Foam::psiReactionThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:? #12 Foam::psiChemistryModel::psiChemistryModel(Foam::fvMesh const&) at ??:? #13 Foam::chemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > >::chemistryModel(Foam::fvMesh const&) at ??:? #14 Foam::EulerImplicit<Foam::chemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::EulerImplicit(Foam::fvMesh const&) at ??:? #15 Foam::psiChemistryModel::addfvMeshConstructorToTable<Foam::EulerImplicit<Foam::chemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::New(Foam::fvMesh const&) at ??:? #16 Foam::autoPtr<Foam::psiChemistryModel> Foam::basicChemistryModel::New<Foam::psiChemistryModel>(Foam::fvMesh const&) at ??:? #17 Foam::psiChemistryModel::New(Foam::fvMesh const&) at ??:? #18 at ??:? #19 __libc_start_main in "/lib64/libc.so.6" #20 at ??:? Floating point exception (core dumped)
-
使用sprayFoam求解器设置多喷雾入口算例或许是我的表述不够清晰,我想模拟图一所示的构型,两股不同的喷雾分布从不同的喷雾入口注入,我看到之前DieselFoam(或许是sprayFoam的前身)可以通过指定不同的X来喷注两种液体,这应该在sprayFoam中如何实现呢?
-
使用sprayFoam求解器设置多喷雾入口算例 -
使用sprayFoam求解器设置多喷雾入口算例想请教一下有没有老师之前设置过多个喷雾的算例,我目前想设置两个喷雾入口,并且注射不同的液体,但我对sprayCloudProperties中的subModels实在不熟悉,希望有老师能够指教一番
subModels { particleForces { sphereDrag; } injectionModels { model1 { type patchInjection; SOI 0; massTotal 0.0000147; duration 1; parcelBasisType fixed;//mass; nParticle 1; patchName INLET_LIQUID;//FUELINLET; parcelsPerSecond 3.02e8; U0 (0 0 0.52); flowRateProfile constant 1; sizeDistribution { type fixedValue; fixedValueDistribution { value 5e-6; } } } } dispersionModel none; patchInteractionModel standardWallInteraction; heatTransferModel RanzMarshall; compositionModel singlePhaseMixture; phaseChangeModel liquidEvaporationBoil; surfaceFilmModel none; atomizationModel none; breakupModel ReitzDiwakar; // ReitzKHRT; stochasticCollisionModel none; radiation off; standardWallInteractionCoeffs { type rebound; } RanzMarshallCoeffs { BirdCorrection true; } singlePhaseMixtureCoeffs { phases ( liquid { C12H26 1; } ); } liquidEvaporationBoilCoeffs//定义液体蒸发和沸腾特性的配置 { enthalpyTransfer enthalpyDifference; activeLiquids ( C12H26); } ReitzDiwakarCoeffs { solveOscillationEq yes; Cbag 6; Cb 0.785; Cstrip 0.5; Cs 10; } TABCoeffs { y0 0; yDot0 0; Cmu 10; Comega 8; WeCrit 12; } }
-
编译求解器的时候出现undedined reference错误@李东岳 李老师,该问题已经解决,是由于部分的options文件多了这一行,导致编译的时候标准不同了。
但是在调试算例的时候又出现了如下问题,应该是src中lagrangian有一部分存在问题,但是目前我没找到具体的问题出在哪,不知道是不是版本不同编译导致的?
-
编译求解器的时候出现undedined reference错误各位老师,我想请教在编译求解器的时候出现如下错误应该如何解决:
* -lm -o /share/home/zhoufan/OpenFOAM/zhoufan-7/platforms/linux64GccDPInt32Opt/bin/coalFPVFoam * /share/home/zhoufan/OpenFOAM/zhoufan-7/platforms/linux64GccDPInt32Opt/lib/libFlameletPCClagrangianIntermediate.so: undefined reference to `Foam::UOPstream::writeQuoted(std::string const&, bool)' * /share/home/zhoufan/OpenFOAM/zhoufan-7/platforms/linux64GccDPInt32Opt/lib/libFlameletPCClagrangianIntermediate.so: undefined reference to `Foam::regExp::match(std::string const&) const' * /share/home/zhoufan/OpenFOAM/zhoufan-7/platforms/linux64GccDPInt32Opt/lib/libFlameletPCClagrangianIntermediate.so: undefined reference to `Foam::regExp::regExp(std::string const&, bool)' * collect2: error: ld returned 1 exit status * make: *** [/share/home/zhoufan/OpenFOAM/zhoufan-7/platforms/linux64GccDPInt32Opt/bin/coalFPVFoam] Error 1
我编译的该求解器是在of6上编写的,我尝试修改之后在of7上进行编译,结果出现上述问题。
以下是求解器的options文件:
-
mapField报错自问自答一下,可以参考cfd-online上的这个帖子
https://www.cfd-online.com/Forums/openfoam-bugs/194353-mapfields-major-bug.html
OpenFoam通过反向距离插值(reverse distance interpolation)来实现插值This interpolation will crash if point from which we interpolate and point interpolate to overlaps. So in OpenFOAM code this interpolation used only if distance between points is larger than directHitTol variable.
src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C文件中directHitTol默认为10e-5,将其修改为10e-10🌟可以解决我遇到的这个报错
-
mapField报错各位老师,我要计算一个比较大的网格,大概是九千万左右的网格数,一开始设置了一个比较粗的网格,计算了一段时间以后想要映射到这个细网格上面,但是在超算上面映射会报错,想问一下各位老师知道是什么原因吗?
我用的命令是:mapFields ../JICF -consistent
还有相请教一下mapFields如何多核并行映射呢,采用-parallel
会显示没有这个option
(现在真的太慢了) -
sprayFoam报错我的
chemistryProperties
是这样设置的:chemistryType { chemistrySolver ode; chemistryThermo psi; } chemistry on; initialChemicalTimeStep 1e-8; EulerImplicitCoeffs { cTauChem 1; equilibriumRateLimiter off; } odeCoeffs { solver seulex; absTol 1e-12; relTol 1e-1; } // ************************************************************************* //
-
sprayFoam报错请教一下,我用sprayFoam求解器跑了一晚上之后报了这个错是什么原因呀?:134
-
运行结束后输出密度rho@李东岳 老师你好,是可压缩的算例,我在计算的后期修改求解器的代码输出了rho,现在想通过后处理手段补上前期时刻的rho
-
运行结束后输出密度rho我是个openfoam新手,请教一下各位老师:
我的算例计算时没有输出密度rho,在计算结束后,还有办法输出吗?