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

Coupling interFoam and DPMFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2016, 09:27
Default Coupling interFoam and DPMFoam
  #1
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Hi,
I am trying to incorporate the interFoam and DPMFoam to simulate the air-water-particles systems. I want to create the viscosity field of continuous phases using the mixture law.

volScalarField muc
(
IOobject
(
"muc",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*rho1*"nu1" + alpha2*rho2*"nu2",
alpha1.boundaryField().types()
);

but I am in trouble with reading "nu" from "transportProperties" file.
Anyone can help me?

if anyone has similar codes for the Multiphase-DPM coupled problem and share here, it will be very helpful.

Thank you very much!

Linmin
lilinmin is offline   Reply With Quote

Old   March 22, 2016, 07:19
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by lilinmin View Post
Hi,
I am trying to incorporate the interFoam and DPMFoam to simulate the air-water-particles systems. I want to create the viscosity field of continuous phases using the mixture law.

volScalarField muc
(
IOobject
(
"muc",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*rho1*"nu1" + alpha2*rho2*"nu2",
alpha1.boundaryField().types()
);

but I am in trouble with reading "nu" from "transportProperties" file.
Anyone can help me?

if anyone has similar codes for the Multiphase-DPM coupled problem and share here, it will be very helpful.

Thank you very much!

Linmin
Hi Linmin,

From your code, you can just use:

Code:
twoPhaseProperties.mu();
to calculate mu. It has already been implemented in incompressibleTwoPhaseMixture class.

__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   March 22, 2016, 07:30
Default
  #3
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
Hi Linmin,

From your code, you can just use:

Code:
twoPhaseProperties.mu();
to calculate mu. It has already been implemented in incompressibleTwoPhaseMixture class.

twoPhaseProperties.mu(); It returns the "mu" of mixture? And if it is calculated according to "alpha1*rho1*nu1+alpha2*rho2*nu2"?
lilinmin is offline   Reply With Quote

Old   March 22, 2016, 07:36
Default
  #4
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by lilinmin View Post
twoPhaseProperties.mu(); It returns the "mu" of mixture? And if it is calculated according to "alpha1*rho1*nu1+alpha2*rho2*nu2"?
Yep, it has beed defined here:
Code:
Foam::tmp<Foam::volScalarField>
Foam::incompressibleTwoPhaseMixture::mu() const
{
    const volScalarField limitedAlpha1
    (
        min(max(alpha1_, scalar(0)), scalar(1))
    );

    return tmp<volScalarField>
    (
        new volScalarField
        (
            "mu",
            limitedAlpha1*rho1_*nuModel1_->nu()
          + (scalar(1) - limitedAlpha1)*rho2_*nuModel2_->nu()
        )
    );
}
For more info check it here if u understand Chinese, Eq.(21): http://www.dyfluid.com/interFoam.html

__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   March 22, 2016, 07:44
Default
  #5
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
Yep, it has beed defined here:
Code:
Foam::tmp<Foam::volScalarField>
Foam::incompressibleTwoPhaseMixture::mu() const
{
    const volScalarField limitedAlpha1
    (
        min(max(alpha1_, scalar(0)), scalar(1))
    );

    return tmp<volScalarField>
    (
        new volScalarField
        (
            "mu",
            limitedAlpha1*rho1_*nuModel1_->nu()
          + (scalar(1) - limitedAlpha1)*rho2_*nuModel2_->nu()
        )
    );
}
For more info check it here if u understand Chinese, Eq.(21): http://www.dyfluid.com/interFoam.html

I write the code as:
volScalarField muc
(
IOobject
(
"muc",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
twoPhaseProperties.mu(),
alpha1.boundaryField().types()
);
But it shows the error: " ‘twoPhaseProperties’ was not declared"
Very sorry to interrupt again! And you documents are very helpful!
Thank you very much !
lilinmin is offline   Reply With Quote

Old   March 22, 2016, 08:04
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
hi

i will give u a more explaination after i finish my dinner.

__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   March 22, 2016, 09:12
Default
  #7
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
hi

i will give u a more explaination after i finish my dinner.

Thank you very much again, and looking forward to your explanation!
lilinmin is offline   Reply With Quote

Old   March 22, 2016, 22:30
Smile
  #8
New Member
 
Li Linmin
Join Date: Nov 2015
Location: China
Posts: 27
Rep Power: 10
lilinmin is on a distinguished road
Quote:
Originally Posted by sharonyue View Post
hi

i will give u a more explaination after i finish my dinner.

According to your suggestion, I have added:

incompressibleTwoPhaseMixture twoPhaseProperties(U, phi);

and used the code:

twoPhaseProperties.mu(),

to read the viscosity of mixture and successfully complied the code.
Thank you very much again for your help and your web is very helpful.
Linmin
lilinmin is offline   Reply With Quote

Reply

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
Multiphase Solid Particle Tracking alexlupo OpenFOAM Running, Solving & CFD 114 March 17, 2022 21:52
Issue with pressure boundary and gravity in DPMFoam eric OpenFOAM Running, Solving & CFD 6 May 8, 2019 09:28


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