CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Conditional solving of transport equations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2018, 06:02
Default Conditional solving of transport equations
  #1
Member
 
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10
upuli is on a distinguished road
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
upuli is offline   Reply With Quote

Old   June 18, 2018, 16:33
Default
  #2
Member
 
Vince
Join Date: Mar 2017
Posts: 45
Rep Power: 9
hyFoam is on a distinguished road
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
hyFoam is offline   Reply With Quote

Old   June 18, 2018, 23:06
Default
  #3
Member
 
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10
upuli is on a distinguished road
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.
upuli is offline   Reply With Quote

Old   July 10, 2018, 02:06
Default
  #4
Member
 
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10
upuli is on a distinguished road
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);
pre.cjk { font-family: "Nimbus Mono L", monospace; }p { margin-bottom: 0.1in; line-height: 120%; }a:link { }
upuli is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 11:45.