Is it possible to up a 3d transient heat transfer problem, where, in the equation settings, the heat source term is dependent on x, y, z? I tried using a local function (qetflux(x, y)) but I cannot seem to be able to do it?
I managed to do it with a user defined Function getflux(x,y,z,T). The heat source seems to always be an integral value, i.e. in Watts. How could I specify a volumetric heat source in Watts/m^3 that varies with x,y and z?
If you define a 3D heat source term the (SI) unit will be [W/m3], irrespective of the way its defined. Even if you use a pointwise user defined function, in each (x,y,z) point the heat source will be [W/m3] but can vary pointwise.
A heat source Q=1 (constant) and Q=myfunc(x,y,z) where myfunc.m is defined as:
function res = myfunc(x,y,z)
res = ones(size(x));
are completely equivalent (with the exception that the constant is much faster to evaluate).