adding drift velocity to scalar
Posted: Wed Sep 27, 2017 3:19 pm
Hello,
I would like to add a drift velocity to a scalar field I am solving.
After having looked at the documentation and examples, it is not clear for me the exact way to do that.
1) First, in the cs_user_parameters.f90 I have to activate the relative flag. Is the following the right way (considering that I do not want to take into account thermophoresis and other diffusivities, just add a drift velocity to the main velocity) to do that?
call field_get_key_id("drift_scalar_model", keydri)
if (nscaus.ge.1) then
iscdri = 1
iscdri = ibset(iscdri, DRIFT_SCALAR_ADD_DRIFT_FLUX)
iscal = 1
f_id = ivarfl(isca(iscal))
! Set the key word "drift_scalar_model" into the field structure
call field_set_key_int(f_id, keydri, iscdri)
endif
(but still, I do not understand where I have to set "drift_scalar_model">0)
2) Then, in order to specify the value of the drift velocity, do I have to use the driflu.f90 routine?
Many thanks in advance.
Best regards,
daniele
I would like to add a drift velocity to a scalar field I am solving.
After having looked at the documentation and examples, it is not clear for me the exact way to do that.
1) First, in the cs_user_parameters.f90 I have to activate the relative flag. Is the following the right way (considering that I do not want to take into account thermophoresis and other diffusivities, just add a drift velocity to the main velocity) to do that?
call field_get_key_id("drift_scalar_model", keydri)
if (nscaus.ge.1) then
iscdri = 1
iscdri = ibset(iscdri, DRIFT_SCALAR_ADD_DRIFT_FLUX)
iscal = 1
f_id = ivarfl(isca(iscal))
! Set the key word "drift_scalar_model" into the field structure
call field_set_key_int(f_id, keydri, iscdri)
endif
(but still, I do not understand where I have to set "drift_scalar_model">0)
2) Then, in order to specify the value of the drift velocity, do I have to use the driflu.f90 routine?
Many thanks in advance.
Best regards,
daniele