CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Mass source term in chtMultiRegionFoam

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

Like Tree3Likes
  • 3 Post By Researcher23

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2018, 05:35
Default Mass source term in chtMultiRegionFoam
  #1
New Member
 
Join Date: Mar 2015
Posts: 10
Rep Power: 11
Researcher23 is on a distinguished road
Hi all,

I would like to introduce a mass source in the fluid part of chtMultiRegionFoam. My first try was to introduce a semiImplicitSouce:


Code:
 
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scalarSource
{
    type            scalarSemiImplicitSource;
    duration        1000.0;
    selectionMode   all;
    volumeMode      absolute;
    injectionRateSuSp
    {
        rho           (-0.1 0);
    }
}
My problem is, that rho does not change with this source. Another try was a scalarCodedSource, with the same negative result: rho does not change in my fluid volume!

It is possible to change other fields (energy,...) with this kind of source, but I am interested in changing the masses.

Please could you give me a hint what's going wrong and how can I change rho in chtMultiRegionFoam?

Thanks a lot,
J.
Researcher23 is offline   Reply With Quote

Old   December 4, 2018, 04:22
Default
  #2
New Member
 
Join Date: Mar 2015
Posts: 10
Rep Power: 11
Researcher23 is on a distinguished road
Did somebody have an answer to my question?
Researcher23 is offline   Reply With Quote

Old   December 7, 2018, 05:13
Default
  #3
New Member
 
Join Date: Mar 2015
Posts: 10
Rep Power: 11
Researcher23 is on a distinguished road
Okay, I solved the problem. The bug (or missing feature) was that there is no fvOptions-term in the pressure equation of chtMultiRegionFoam. With adding this missing term my fvOptions mass term works fine. Here is our code fix:

Code:
 
        fvScalarMatrix p_rghEqn
        (
            p_rghEqnComp + p_rghEqnIncomp
          ==
          + fvOptions(psi, p_rgh, rho.name())
        );
Researcher23 is offline   Reply With Quote

Old   January 18, 2019, 08:42
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
Included in OpenFOAM-dev branch with https://bugs.openfoam.org/view.php?id=3146
jherb is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, mass source term

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41


All times are GMT -4. The time now is 13:04.