Hi Frank,
Currently there is no functionality to add a passive scalar just with
the .ini file.
I have not tried this, but it should not be too difficult to "hack" the
functionality in.
In solvers/aceuler/elements.py class BaseACFluidElements(object) you can
add an additional variable, such as T. You need to add it to the end of
all varmap and dualcoeff dictionaries, for example
privarmap = {2: ['p', 'u', 'v', 'T'],
3: ['p', 'u', 'v', 'w', 'T']}
This variable will be addressed with the index ${nvars-1} (last index)
in the mako templates which set the fluxes.
In solvers/aceuler/kernels/flux.mako you can write the convective flux
for your passive scalar
% for i in range(ndims):
f[${i}][${nvars-1}] = s[${nvars-1}]*v[${i}];
% endfor
In solvers/acnavstokes/kernels/flux.mako you can write the diffusive flux
% for i in pyfr.ndrange(ndims):
fout[${i}][${nvars-1}] +=
-${c['diff']}*grad_uin[${i}][${nvars-1}]; #you can enter value for diff
in the inifile under constants section
% endfor
Then you need to add the scalar to the existing boundary conditions. For
example, a given value at the inlet
aceuler/kernels/bcs/ac-in-fv.mako:
ur[${nvars-1}] = ${c['T']};
For extrapolation at outlet/walls you can add this line to the
respective mako files.
ur[${nvars-1}] = ul[${nvars-1}];
Off the top of my head, these lines should do it. I am happy to help if
you want to try it.
Cheers,
Niki
On 25/05/17 22:03, Frank Muldoon wrote:
Hello all,
I am interested in solving the incompressible Navier-Stokes equations.
PyFR accomplishes this by means of the artificial compressibility
approach. The question at hand concerns whether it is possible to solve
for temperature and or other passive scalars while solving these
equations.
Cheers,
Frank
--
You received this message because you are subscribed to the Google Groups "PyFR
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.