CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)

 Sang-Jin Lee November 4, 2001 09:21

Hi! everyone,

I'm going through hardships in my project involving with Phase change process simulation. I have to solve this problem using STAR-CD. I discreted governing energy equation and get source term by the linearized form in SORENT.F, "S=S1P-S2P*T", as shown below.

SC = DP*[Hold - H + DHDT*T], SP = - DP*DHDT

S1P = SC - (RHO/DT)*Told, S2P = -SP - RHO/DT

I don't know how to get the value of "Hold(Enthalpy) and Told(Temprature)", one time step before. I urgently need the imformation. Anybody know? Please let me know it... Any question, advice or discussion will be welcome!

Sang-jin Lee

 star-user November 17, 2001 11:13

Re: About source term in SORENT.F

You can use posdat.f to take cell and wall data for temperature from one iteration and store that in your user array which can be passed to sorent.f

Contact you Star-CD support and then should be able to provide you with sample coding.

 Sang-Jin Lee November 21, 2001 11:52

Re: About source term in SORENT.F

I also thought about modification of posdat.f and sorent.f, but I'm not used to do it. I inquired the sample coding as U mentioned to Star-CD support, UK. But no answer so far... I'm under dilemma... Would you please show me the process or coding if it's available to you? Thanks for your advice again.

Sang-Jin Lee

 yjl November 24, 2001 12:14

Re: About source term in SORENT.F

Hi Sang-Jin

For each time step, there are one predictor and several corrector steps for solving the energy equation and sorent.f is called in all the predictor and corrector steps. So you can see the passed field values in the first call for sorent.f are the old values. You can create a local common block to store those values. Make sure you have a indicator here to let you update those old values at the beginning of each time step or in the first call of it. The next question you may ask is how to know it is the first call or it is at the beginning of a new time step. You can use postdat.f or other user subroutines which are called at the beginning of each time step to give you this information. For example, using isstep as the indicator and set isstep=0 in postdat.f. In sorent.f when isstep=0 update your old field values then set isstep=1. Sure, isstep is passed by your local common block.

Have a fun.

 All times are GMT -4. The time now is 11:30.