Hi Song,

You should be able to achieve this using a Body forcing.
To do this, add the following Forcing section to your xml file
    <FORCING>
        <FORCE TYPE="Body">
            <BODYFORCE> BodyForce </BODYFORCE>
            <FIELDFORCETIMEFCN>  s1  </FIELDFORCETIMEFCN>
        </FORCE>
    </FORCING>
and define the BodyForce function
        <FUNCTION NAME="BodyForce">
            <E VAR="rho" VALUE="s0_rho" />
            <E VAR="rhou" VALUE="s0_rhou" />
            <E VAR="E" VALUE="s0_E" />
        </FUNCTION>
where you should replace s1 and s0 by the expressions you need for your model.

I think you can obtain a discontinuous s1 by using logical expressions (e.g. s1 = (t>1)*2 + 1).
However, since the symbols < and > can cause problems in the xml format, they must
be replaced by &lt; and &gt;

Cheers,
Douglas

2017-02-27 3:59 GMT-03:00 Song Ke <songke21@outlook.com>:

Hi All,

I am trying to define an ununiform and unsteady source term in  CompressibleFlowSolver (nektar 4.3.5).

The source term is independant on flow fields ,and can be defined as
               s(x,y,z, t) = s0(x,y,z)* s1(t)

Here, "s0" can be obtain by a numerical model, and "s1" is a  simple and discontinuous function. ( "t" is time.)

Can anyone please give me some advise of how to set this source term to CompressibleFlowSolver ?

Thanking you.

Regards,

S.Ke


_______________________________________________
Nektar-users mailing list
Nektar-users@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/nektar-users