# Comparing of Scalar value at each Time step -Subroutine

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 28, 2015, 03:17 Comparing of Scalar value at each Time step -Subroutine #1 Member   iman Join Date: Jun 2015 Posts: 30 Rep Power: 4 Dear all, I am dealing with a problem with Star-CD, about the impact of droplet on a surface. Scalar (1) =Air Scalar (2) =Water Indeed, I am going to compare of Scalar (2) at each time step and put the bigger value instead of the lower one. i have a difficulty to set these kind of subroutine. Phase source as a user coding (direct: Thermophysical model and properties—Source Terms—Scalar— User coding). I would be appreciated if anyone could help me to that what kind of function as user coding would be suitable in this condition. Thank you very much in advance.

 October 30, 2015, 07:25 #2 Senior Member   Blanco Join Date: Mar 2009 Location: Torino, Italy Posts: 160 Rep Power: 10 Hi, I don't know if I properly understand your problem...but if you want to set the value of a scalar somewhere in your simulation domain, as the value you get during your simulation somewhere else at each time-step, then you should use both posdat.f and the user coding for the scalar source terms. You can post-process the scalar value at each time step using posdat, then create a variable to be shared with scalar source term subroutine and use that variable in the source subroutine to set what you need. Hope this helps, Regards, Andrea

 October 31, 2015, 23:13 #3 Member   iman Join Date: Jun 2015 Posts: 30 Rep Power: 4 Dear Bianco Thanks a lot for the reply. Actually, I have read the manual, but I still have problems regarding this implementation (to write a subroutine using posdat.f). Could you be so kind and point me to some references or samples, in order to understand how to apply it. Indeed, I want to consider the wetting condition of wall boundary. A solid surface has its own absorption characteristics. For example, glass and metal surfaces do not absorb the liquid, but a paper surface does. This different property makes different traces when the liquid moves on the solid surface. As I mentioned in the opening, I am going to provide the scalar source in which whenever the surface becomes wet, permanently it stays wet by comparison of the scalar value at each time step, and adding the amount of decreasing during the spreading. Thank you very much in advance.

 November 9, 2015, 04:21 #4 Senior Member   Blanco Join Date: Mar 2009 Location: Torino, Italy Posts: 160 Rep Power: 10 Hi, I think it's not very easy to implement what you want, but in any case the very first step is writing a posdat in order to obtain the scalar value on the wall, in order to track it. I would suggest to contact your local sales dept. in order to ask assistance about the posdat, because there are lot of variables available other then the ones writtne in nom.inc. I suppose you have already tried a simple wall liquid film model, am I right?

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08 lakeat OpenFOAM Mesh Utilities 57 February 1, 2015 09:25 Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34 danny123 OpenFOAM 19 October 24, 2012 07:44

All times are GMT -4. The time now is 18:02.

 Contact Us - CFD Online - Privacy Statement - Top