setFixedTempProfile function

47 views
Skip to first unread message

Etienne Espada

unread,
Aug 21, 2025, 12:03:41 PMAug 21
to Cantera Users' Group
Hello everyone,

I am coming back to regarding the setFixedTempProfile() which allows the user to fix a temprature profile for a 1D simulation (Sim1D class). In the latest version of cantera (and previous one) I saw lines 302 - 303 in StFLow.cpp the following comment : 

rsd[index(c_offset_U,j)] = (rho_u(x,j)
- m_rho[0]*0.3); // why 0.3?

I don't understand why there is a 0.3 indeed. This line concerns the fixed point temperature. To me at this point when the temperature is fixed, the residual should be 0 so instead of :(line 302-303)
               rsd[index(c_offset_U,j)] = (rho_u(x,j)- m_rho[0]*0.3); 
we should have had :
                rsd[index(c_offset_U,j)] = (T(x,j)- m_fixedtemp[x]);
 which is what is done above when energy ins't disabled : (line 300)
                rsd[index(c_offset_U,j)] = (T(x,j) - m_tfixed);

Why question is the following : why this expression ? I believe that the fixed point is useful for freeflow as it enables to have a fixed flame front in space and so that the flame speed becomes a eigen value of the problem (please correct me if I am wrong).

The context of my interogation is that I want to do a similar thing for another variable of the solution vector (The FixedTemperatureProfile allows to fix the temperature by desabling the energy equation and I want to do the same for the velocity for instance by desabling the continuity equation or I want to do the same by fixing the profile of some species)

Thanks in advance, 

Etienne ESPADA PhD

Ray Speth

unread,
Sep 17, 2025, 11:47:37 PMSep 17
to Cantera Users' Group

Hi Etienne,

There are a couple ways to think about this. One is purely mathematical. The equation
rsd[index(c_offset_U,j)] = (T(x,j)- m_fixedtemp[j]);
would be linearly dependent with the equation which is already applied for the energy equation residual (see Flow1D::evalEnergy):
rsd[index(c_offset_T, j)] = T(x, j) - T_fixed(j);

The other is more conceptual. When the energy equation is enabled, we have a well-posed eigenvalue problem — what is the axial velocity that will hold the flame location fixed? But if the temperature profile is simply imposed, then there is no dependence of the temperature on the velocity, and therefore no way of determining the velocity. So here, that equation is simply replaced with an equation that fixes the velocity at 0.3 m/s. If I had to guess “why 0.3”, I’d say that it’s because this is a reasonable order-of-magnitude guess for the flame speed under typical conditions, and works well enough at being good enough for the solver to converge once the energy equation is enabled.

If you want to impose fixed species profiles, I don’t think there is any similar challenge, since the species profiles don’t directly go into the definition of the eigenvalue problem. If you want to impose a velocity (at the inlet, say), the correct model for that is the burner-stabilized flame, which does not uses this eigenvalue formulation.

Regards,
Ray

Etienne Espada

unread,
Sep 18, 2025, 3:56:20 AMSep 18
to Cantera Users' Group
Hi Ray, 

Thanks a lot for your explanations, it is all clear now ! Concerning the velocity rather than imposing the velocity at the inlet I want to impose a specific velocity profile. Let's say I want to freeze the velocity profile in the domain, I wanted to do just like the fonction setFixedTemepratureProfile but it might be a bit different would you have any advices on what to look at specifically ? I am worried about the boundary conditions mainly. Or do you think that because I am imposing a velocity profile I don't need the formulation of a FreeFlame anymore but I should rather use the burner stabilized archetype ? 

Also, can the fixed temperature profile be used with counterflow diffusion flames ? 

Thanks in advance, 

Regards,

Etienne

Ray Speth

unread,
Sep 18, 2025, 12:55:23 PMSep 18
to Cantera Users' Group
Hi Etienne,

In the case of an unstrained flame, I think imposing a full velocity profile is a bit problematic, at least in terms of the physics. Once you specify the velocity at one point, the rest of the profile is dictated by mass conservation, since rho*u is a constant. Although any imposed profile is going to violate the conservation laws, this seems like the worst option. In the counterflow configuration, I suppose you could impose a velocity profile, and then compute the tangential velocity gradient (V) that's locally consistent with that. Then I think it would only be the momentum equation that is not correctly satisfied. And yes, fixing the temperature profile is already supported for the counterflow flame configuration.

Imposing the velocity is certainly more aligned with the burner stabilized case than the freely-propagating flame, as that is the essential difference between the two configurations.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages