|
[Sponsors] |
June 18, 2018, 06:02 |
Conditional solving of transport equations
|
#1 |
Member
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10 |
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: 9 |
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: 10 |
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: 10 |
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<label> removedCellsFromMatrix; DynamicList<scalar> valuesToImpose; forAll(solid, celli) { if(solid[celli] < 1) { removedCellsFromMatrix.append(celli); } } forAll(removedCellsFromMatrix, i) { valuesToImposemass.append(300.0); } fvScalarMatrix TsEqn ( fvm::ddt(Ts) + fvm::div(phibed,Ts) - fvc::laplacian(DTs,Ts) ); TsEqn.solve(); TsEqn.setValues(removedCellsFromMatrix, valuesToImpose); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem with Min/max rho | tH3f0rC3 | OpenFOAM | 8 | July 31, 2019 09:48 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 02:20 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 06:37 |
SLTS+rhoPisoFoam: what is rDeltaT??? | nileshjrane | OpenFOAM Running, Solving & CFD | 4 | February 25, 2013 04:13 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |