# Discussion Forum

## Entering source term

 Topics: no topics
RSS feed   |   Turn on email notifications   |   1 Reply   Last post: June 27, 2013 10:01am UTC

Moses Omolayo Petinrin

June 26, 2013 7:13pm UTC

Entering source term

hi

Please, what do I do to enter the equation in the attached file as the source term of heat energy equation for solification process in comsol multiphysics.

I am write this way:
S=d(((Th_Cond(T)/cp_s2)*d((cp_s2-cp)*T,r)),r)+d(((Th_Cond(T)/cp_s2)*d((cp_s2-cp)*T,z)),z)-d((rho_ls(T)*(1-B)*u*((cp_l-cp_s2)*T)),r)-d((rho_ls(T)*(1-B)*w*((cp_l-cp_s2)*T)),z)

If so what other things needed to be done

Suresh Seetharam

June 27, 2013 10:01am UTC in response to Moses Omolayo Petinrin

Re: Entering source term

Hi,

Just looking at your equation system, I would do it the following way:

Define all these under variables:
Hs=cp_s2*T
H=cp*T
Keff=Th_Cond(T)
fs=xx
u =xx
us=xx
v=xx
vs=xx
cs=xx
S=1/r*d(r*keff/cs*d(Hs-H,r),r)+d(keff/cs*d(Hs-H,z))-d(rho*fs*(u-us)*(Hs-H),r)-d(rho*fs*(v-vs)*(Hs-H),z)

Finally, in the source term, I would just input S as the variable.

I am not questioning your formulation, but just be careful in dealing with axisymmetric problems.

But anyway double check.

Suresh

Rules and guidelines