Dear All,
I am simulating a turbulent premixed flame utilizing the turbulent_flame samples. However, I am encountering issues at the inlet when using a high inflow velocity with NSCBC.
With fbcx1 = 0.8 Mach, the simulation fails at the inlet. It appears that NSCBC causes the x-velocity (iux) at the inlet to drift rapidly, leading to an abrupt increase in temperature just after the inlet point, causing the computation to blow up with the message
FATAL ERROR: calc_for_chem_mixture: TT_full(:,j2,j3) is outside range (To note, this error is not because of the flame hitting the inlet. I have checked)
I am using the 'part_ref_inlet' subroutine, but I have also tried other subroutines without success. To mention, this problem does not occur at lower Mach numbers (e.g., fbcx1 < 0.3).
Moreover, the case was made simpler to remove any complexities. In the setup, there were no fluctuations (i.e. uniform flow) from the inlet and there was no flame (and no reaction) in the domain, yet the computation blew up similarly.
Does anyone know what might be going wrong? ( I can share my simple case it is cheap in computation)
Are there any modifications to the NSCBC implementation required?
I would be highly grateful for any suggestions or help!
Thanks,
Saifullah
Dear Saifullah
As far as I am aware, the Pencil-Code implementation of the NSCBC boundary conditions have never been tested at high Mach numbers. I would suggest that you try tuning the value of nscbc_sigma_in in NSCBC_init_pars to see if that can solve the problem.
If the above suggestion does not help, I guess the current implementation is not appropriate for high Mach numbers. In particular, transversal terms might have to be included at these high velocities. These terms have been implemented (and can be turned on through NSCBC_run_pars), but the implementation has never been validated.
Best,
Nils
--
You received this message because you are subscribed to the Google Groups "pencil-code-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pencil-code-dis...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/pencil-code-discuss/a101f18a-7867-40f9-bf7e-6b675a5b902cn%40googlegroups.com.
Dear Nils,
Sorry for the late reply, and thank you for your response and suggestions.
From my investigation, it seems that the instability might be related to the computation of the upstream-propagating wave, L_1
L_1 = (f(lll,m1:m2,n1:n2,iux) - cs0_ar(m1:m2,n1:n2))*&
(dpp_dx - rho0(m1:m2,n1:n2)*cs0_ar(m1:m2,n1:n2)*dux_dx)
There could be an issue with this equation, either numerical or physical.
Currently, L_1 is being computed from the domain (using the der_onesided_4_slice subroutine) because it is assumed that the wave is coming from the domain towards the inlet. However, when the flow becomes supersonic at any grid point of the inlet then the wave L_1 is moving in the domain through the inlet (as u - c > 0 ). Therefore, the L_1 now (supersonic case) should be computed from inflow conditions.
A solution: Now I am making the L_1 zero at supersonic inlet gridpoints assuming that no fluctuations of the L_1 wave are present in inflow conditions and therefore L_1=0.0 when u - c > 0. Fortunately, this stabilized the simulation, and it no longer fails at the inlet.
I will continue investigating and will share updates as I make progress.
Meanwhile, if anyone has insights or suggestions, I would be highly grateful!
Best regards,
Saifullah
Dear Saifullah
Thanks for the update.
It makes a lot of sense to set L_1 to zero for supersonic cases, and I am glad this seems to solve the problems at the inlet. Does this mean that even the original implementation works for high (but still <1) Ma flows as long as supersonic conditions never appears at the inlet?
Best,
Nils
From:
"pencil-co...@googlegroups.com" <pencil-co...@googlegroups.com> on behalf of Saifullah Sarfraz <saifullah...@gmail.com>
Reply-To: "pencil-co...@googlegroups.com" <pencil-co...@googlegroups.com>
Date: Friday, 7 March 2025 at 22:28
To: "pencil-co...@googlegroups.com" <pencil-co...@googlegroups.com>
Subject: Re: Simulation fails with High Mach inflow NSCBC
Dear Nils,
Sorry for the late reply, and thank you for your response and suggestions.
1. I tried tuning the nscbc_sigma_in parameter, but the simulation still fails at nearly the same time, so it doesn’t seem to resolve the issue.
2. Since I am unsure whether the current implementation is suitable for high Mach numbers, I attempted to implement Poinsot and Lele’s (1991) LODI equations in a new subroutine. Their work demonstrated stability (same 1991 paper) even in supersonic cases, but unfortunately, my implementation did not work either. It led to failure even earlier.
3. I don’t think the issue is related to transversal terms. To test this, I simplified the case by feeding zero fluctuations at the inlet (i.e., only a uniform inflow), ensuring that no transversal effects are present. Still, the simulation fails when the flow Is supersonic. I also tried implementing transversal (notransveral_terms=F) with fluctuations but it didn't help.
To view this discussion visit
https://groups.google.com/d/msgid/pencil-code-discuss/ff91d9bf-f8d2-47d5-a3b2-7e1cd98374c3n%40googlegroups.com.
Dear Nils,
Thank you for asking for clarification about this.
Yes, as far as I have seen if the Mach number remains below 1 across the entire inlet, the original implementation (bc_nscbc_prf subroutine) works fine without failing.
Best regards,
Saifullah
Good, thanks for the clarification.
To view this discussion visit
https://groups.google.com/d/msgid/pencil-code-discuss/b82aba56-1f42-466c-b1c0-b69846bfb088n%40googlegroups.com.