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

Strongly negative scalarSemiImplicitSource causing divergent behavior

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2023, 13:32
Default Strongly negative scalarSemiImplicitSource causing divergent behavior
  #1
New Member
 
Martin Marone
Join Date: Oct 2023
Posts: 3
Rep Power: 3
MaroneM is on a distinguished road
Hello everyone!

I am trying to implement a personalized solver in openFoam in order to solve the transport of chemical species, and I am having some trouble to model a simple "cleaning" sink term on my equations. I based my model on what I would have done for an idealized heat-exchanger (since I am treating this chemical species as a volScalarField an therfore it is analog to the T field), so I am using a scalarSemiImplicitSource defined through the constant/fvOptions file as follows:

Code:
myElementSink
{
    type            scalarSemiImplicitSource;
    active          true;

     selectionModecell   Zone;
     cellZone                hx;
     volumeMode          specific;

     injectionRateSuSp
     {
        myElement	(0 -0.4);
     }
}
When I use values for the implicit term that are close to 0 (in the example it is -0.4) I obtain the expected behavior from the simulation. Nevertheless, if I go for strongly negative values (that I would need to model an efficient "cleaning" system) the simulation diverges and returns an increasing positive value (as if this was a source instead of a sink). If anyone has an idea of what might be happening and how to correct it, that would be great!

Just in case, the equation that I am solving with my solver looks like this:

Code:
        fvScalarMatrix myEq 
        (
              fvm::ddt(myElement)
            + fvm::div(phi, myElement)
            - fvm::laplacian(diffCoeff, myElement)
            ==
            + myExplicitSource
            + fvOptions(myElement)
        );

        myEq.relax(RELAX_FACTOR);
        fvOptions.constrain(myEq);

        initResidual += myEq.solve().initialResidual();

        fvOptions.correct(myElement);
        myElement.correctBoundaryConditions();
Thank you in advance ^^
MaroneM is offline   Reply With Quote

Old   December 1, 2023, 10:47
Default
  #2
New Member
 
Martin Marone
Join Date: Oct 2023
Posts: 3
Rep Power: 3
MaroneM is on a distinguished road
Ok, so I did not find a "detailed" solution for this but I ended up working with much higher relaxation (even bellow 0.4 in some cases) to get the simulations through.
MaroneM is offline   Reply With Quote

Reply

Tags
divergence, fvoptions, scalarsemiimplicitsource, sink term, volscalarfield


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 06:47.