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

Coupling interFoam and DPMFoam

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

Reply
 
LinkBack Thread Tools 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: 23
Rep Power: 2
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: Torino, Italy
Posts: 742
Rep Power: 9
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.

__________________
Im the translator of OpenFOAM User Guide Chinese Edition! But always newbie on CFD.

http://dyfluid.com/en.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: 23
Rep Power: 2
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: Torino, Italy
Posts: 742
Rep Power: 9
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

__________________
Im the translator of OpenFOAM User Guide Chinese Edition! But always newbie on CFD.

http://dyfluid.com/en.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: 23
Rep Power: 2
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: Torino, Italy
Posts: 742
Rep Power: 9
sharonyue is on a distinguished road
hi

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

__________________
Im the translator of OpenFOAM User Guide Chinese Edition! But always newbie on CFD.

http://dyfluid.com/en.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: 23
Rep Power: 2
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: 23
Rep Power: 2
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase Solid Particle Tracking alexlupo OpenFOAM Running, Solving & CFD 66 May 12, 2016 02:50
Issue with pressure boundary and gravity in DPMFoam eric OpenFOAM Running, Solving & CFD 1 October 15, 2015 05:22


All times are GMT -4. The time now is 09:08.