nonlinear BC and source
Hi,
Does anybody know how to program a nonlinear boundary condition for a userdefined scalar ? Consider this example: d^c dc  + ()^2 = 0 dx^2 dx With boundary condition: @x=0 C=0 dC @x=1  = C^2 > Non linear boundary condition dx The analytical solution of this is : e(1exp(x))  (e1)^2 SORSCA with POSDAT works fine for modeling source terms. But how to model a nonlinear BC ? It seems to be not working through BCDEFW and POSDAT. I tried to put it as source in the last cell, but it fails too. Please let me know. 
Re: nonlinear BC and source
But what is you problem ? Howe are you set the BC ? And what is not working ?

Re: nonlinear BC and source
My problem is as follows:
BCDEFW is the subroutine where we set user defined scalar value. since my boundary condition is nonlinear I have to use POSDAT to calculate the nonlinear value and pass this value to BCDEFW. i.e in BCDEFW I would have some code like: Code in POSDAT: =============== COMMON /MYSCALAR/SCALVAL IF (IBND .EQ. 42) THEN SCALVAL = T(ICELL,1+1)^2 END IF (IBND is the boundary number) Code in BCDEFW: ============== COMMON /MYSCALAR/SCALVAL IF (IBSTAR .EQ. 42) THEN SCALAR(01) = SCALVAL END IF The SCALVAL is originally calcualted using POSDAT at level 1 and passed by COMMON block to BCDEFW. SOmehow, this does not seem to yield proper results (convergence is attained though). Is there anything more to do when I write nonlinear boundary conditions ? 
Re: nonlinear BC and source
Whay You are not write:
Code in BCDEFW: ============== COMMON /MYSCALAR/SCALVAL IF (IBSTAR .EQ. 42) THEN SCALAR(01) = TC^2 END IF or something else like this ? why you use POSDAT ? what function you want to calculate ? may be you write what are you want to do. You must set function on boundary type f(Temperature) ? 
Re: nonlinear BC and source
Dear Denizen,
When I tried that it is always diverging. Can you do a favor ? Can you just send me a small (working) example of STARCD subroutine code where you have succesfully implemented a nonlinear Bouncary condition. say for example dc/dx = c^2 please ? It will be must appreciated. 
Re: nonlinear BC and source
I have'not prepeared code to you situation. But i do not see any problem to calculfnt you BC.
Code in BCDEFW: ============== COMMON /MYSCALAR/SCALVAL IF (IBSTAR .EQ. 42) THEN SCALAR(01) = e(1exp(x))/(e1)^2 END IF but you are must set offset to you BC this analitical solution means x=from 0 to .... but you BC is located somwhere x=from 45.54 to 99.34 ensure that it is all fine 
All times are GMT 4. The time now is 06:22. 