CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

non-linear BC and source

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2005, 00:34
Default non-linear BC and source
  #1
Murali
Guest
 
Posts: n/a
Hi,

Does anybody know how to program a non-linear boundary condition for a user-defined 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(1-exp(-x))
------------
(e-1)^2

SORSCA with POSDAT works fine for modeling source terms. But how to model a non-linear 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.
  Reply With Quote

Old   October 22, 2005, 06:37
Default Re: non-linear BC and source
  #2
DenizeN
Guest
 
Posts: n/a
But what is you problem ? Howe are you set the BC ? And what is not working ?
  Reply With Quote

Old   October 22, 2005, 13:18
Default Re: non-linear BC and source
  #3
Murali
Guest
 
Posts: n/a
My problem is as follows:

BCDEFW is the subroutine where we set user defined scalar value. since my boundary condition is non-linear I have to use POSDAT to calculate the non-linear 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 non-linear boundary conditions ?
  Reply With Quote

Old   October 24, 2005, 13:49
Default Re: non-linear BC and source
  #4
DenizeN
Guest
 
Posts: n/a
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) ?
  Reply With Quote

Old   October 25, 2005, 18:01
Default Re: non-linear BC and source
  #5
Murali
Guest
 
Posts: n/a
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 STAR-CD subroutine code where you have succesfully implemented a non-linear Bouncary condition. say for example dc/dx = c^2 please ?

It will be must appreciated.

  Reply With Quote

Old   October 27, 2005, 07:29
Default Re: non-linear BC and source
  #6
DenizeN
Guest
 
Posts: n/a
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(1-exp(-x))/(e-1)^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
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
linear and areal pollutant source Riccardo Buccolieri FLUENT 1 February 27, 2014 07:57
contribution of convective source in total source? Antony Phoenics 4 July 30, 2008 05:15
high positive linear source term using FEM Isi Main CFD Forum 0 June 11, 2008 03:46
Linear Solvers Sachin Main CFD Forum 0 May 6, 2006 12:07
where do I find a source code to solve a linear ma Wang Main CFD Forum 2 May 6, 2004 13:28


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