# no mass flow

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

 April 21, 2005, 07:35 no mass flow #1 Torsten Guest   Posts: n/a Hello, i have created a little model with two fluid layers consiting of two different materials. i defined a scalar in the lower layer. in the upper layer i have inlet and outlet at the head. now i want to generate a material transfer of the scalar to the upper layer. what have i to do? i see only the concentration in the lower layer. thanks a lot

 April 21, 2005, 09:03 Re: no mass flow #2 cmv Guest   Posts: n/a I think you can set a boundary between the two layers (between the two materials) and define a boundary condition for the scalar. The boundary can be a wall or a baffle. Hope it helps

 April 21, 2005, 16:46 Re: no mass flow #3 Torsten Guest   Posts: n/a yes, i defined a boundary (baffle) between the two layers/materials. for the scalar i choose for the boundary diffusion. but it does not work. can it help, if i define the boundary as an wall, and how have i declare it.

 April 25, 2005, 06:51 Re: no mass flow #4 cmv Guest   Posts: n/a ok, I am not very sure if this is the best thing to do, but I think that what you need is use some source terms to inject and extract your scalars. It is my understanding (though not very sure) that you can only set a scalar to diffuse in a baffle boundary and let the convection aside. But it is quite simple, you only need to define something like this: in sorsca.f you can inject an scalar via su=-(1+alpha)*k*vol, and you can also extract the scalar su=(1-alpha)*k*vol; where alpha is the scalar concentration, k is a constant and vol is the cell volume. I hope this helps

 April 25, 2005, 06:54 Re: no mass flow #5 cmv Guest   Posts: n/a sorry forgot to add on my last message that you will need also to fix the "mass defect" on fluinj.f. This is in order to conserve the mass. So you will have to use fluinj.f & sorsca.f. So edit fluinj.f, the advantage of this subroutine is that you can actually define u,v,w,p,t to the scalars you are injecting.

 April 28, 2005, 08:34 Re: no mass flow #6 Torsten Guest   Posts: n/a hello cmv, thank you for your helpfully idea. i have implemented a soucre for the upper layer and a sink for the lower layer, of course with in- and outlet. that is working. but i don't know, what you mean with the sorca.f in the fluinj.f i can also define a scalar. do the scalar gets it's value of the sorca.f?

 May 4, 2005, 14:50 Re: no mass flow #7 cmv Guest   Posts: n/a ok, the overall idea is to have a conservation of mass. if you have scalars coming in and leaving your computational domain, you want to have an equilibrium at your boundaries. the thing with source terms is that in a way you are sort of arbitrarily injecting and extracting scalars at your own will. you have to be careful not to inject more than what you are extracting and viceversa. for each individual scalar you define on your job there will be an equation solving for the (if the solver is turned on!), you can add source terms to this one scalar via sorsca.f. globally there could be mass changes due to these scalar source terms, you can set an equilibrium by using fluinj which is a source term that affects directly the mass conservation equation. hope this helps good luck cm