# Conditional solving of transport equations

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

 June 18, 2018, 06:02 Conditional solving of transport equations #1 Member   Upuli Join Date: Feb 2016 Posts: 68 Rep Power: 7 Hi I have seen some posts on conditional solving of transport equation.Many posts mentioned the use of interfoam solver. But I am not clear how this can be done. I have the following transport equation Code: ```fvScalarMatrix TsEqn ( fvm::ddt(Ts) + fvm::div(phibed,Ts) - fvc::laplacian(DTs,Ts) ); TsEqn.solve();``` I want to solve only in a region where solid is present(in the same mesh). I have another volume scalar field solid which has the value of 1 within the solid region and which has the value of 0 when there are no solids. I used icoFoam solver to develop the equation. How can I solve the above TsEqn within the solid region(solid=1). Thanking You Upuli

 June 18, 2018, 16:33 #2 Member   Vince Join Date: Mar 2017 Posts: 45 Rep Power: 6 Hi Upuli, Isn't the solution identical to the one in this post: Fix velocity value i.e., removing elements from the fvMatrix based on the value taken by the scalarField that is marking fluid and solid regions. Thanks, Vince

 June 18, 2018, 23:06 #3 Member   Upuli Join Date: Feb 2016 Posts: 68 Rep Power: 7 Hi Thank you verymuch. It is same as the thread you mentioned. I will try it. But I am also curious on how this is done in InterFoam solver. There is a thread on that conditional solving of transport equation. But it is not clear to me.

 July 10, 2018, 02:06 #4 Member   Upuli Join Date: Feb 2016 Posts: 68 Rep Power: 7 Hi My solids field is moving along x direction at a constant velocity. I used the below code to solve the TsEqn within the solid field and it doesnot seem to be move when the solid field move in the x direction. Code: ```DynamicList