CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   mapped boundary condition (https://www.cfd-online.com/Forums/siemens/53795-mapped-boundary-condition.html)

john May 11, 2004 04:28

mapped boundary condition
 
Hi,

I want to use mapped boundary conditions in my model. Problem is like this........ I have a very big domain, but I can not neglect small features also. So I am doing analysis on coarse mesh and finalizing flow field. Then I am taking small regions of that domain and refining the mesh. So in that small subdomain I want to give mapped BCs obtained from analysis of big (full)domain. But I am confused how to give such BCs. Kindly guide.

JBS May 12, 2004 09:45

Re: mapped boundary condition
 
Basic idea is to SMAP the solution from the coarse mesh onto the finer mesh. Then restart the finer model (set boundary condition only to prevent errors) with 0 iterations. This will force a pst file to be written without any calculation. "print cset" the values of interest at your new boundary cells to seperate files. Then use BCDEFx user-subroutines that enable you to get a connection between boundary number and prostar cell number. Use Fortran "save" command to set a flag when files are read in. Use this flag to ensure that files are only read once for reduced i/o.

allthough not detailed - hope this helps, JBS

john May 14, 2004 01:04

Re: mapped boundary condition
 
Thanks jbs.

But I did not understand how to use fortran save command. I got your message of getting BCs for news model. Although I have not yet tried.... will it set the velocity, temperature and pressure field at boundaries?

Thanks again

JBS May 14, 2004 04:41

Re: mapped boundary condition
 
Hi John,

the fortran "save" command will store the value of a variable set in a subroutine. you can set a variable (say iFlag)the first time the subroutine is called to a value say "1" (normally intitialised to zero) then the next time the subroutine is called the value will still be "1". you should do the same to your boundary values. this way you can load the files containig your BCs and store them in an array. After that, set the flag to prevent reloading the files. otherwise you would read them every ieration times number of boundaries. of course there are other methods (for example based on subroutine initfi and common blocks)

subroutine xyz data iopen / 0 / save iopen iopen=iopen+1 if (iopen .eq. 1) then write(*,*) 'this is the first time' end if end

greetings


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