Phase Field Modeling Using moose

1,996 views
Skip to first unread message

Sudipta Biswas

unread,
Oct 6, 2014, 4:21:45 PM10/6/14
to moose...@googlegroups.com
Hi,

I am trying to use moose for combining phase field modeling & finite elements. Do you have any document regarding what all modules are to be considered, what all formulations are already in built in moose that will help me for my problem. Let me know if you have any sample tutorial done for this. 

Thanks!
Sudipta    

Daniel Schwen

unread,
Oct 6, 2014, 4:26:48 PM10/6/14
to moose...@googlegroups.com
Sudipta,
check out the phase_field module in MOOSE. There is some documentation at http://mooseframework.com/wiki/PhysicsModules/PhaseField/
Daniel

akansha

unread,
Oct 6, 2014, 4:27:50 PM10/6/14
to moose...@googlegroups.com
Hii,

Have you looked at the documents in the page,

The workshop slides and the the examples are pretty elaborate.

Akansha

Tonks, Michael R

unread,
Oct 6, 2014, 5:22:37 PM10/6/14
to moose...@googlegroups.com
Often for phase field models you also need to couple to mesoscale mechanics, and we typically use the tensor mechanics module for that.




--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/4b135e9f-8895-4e16-9b0d-11c693b9899b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

*************************

Michael R. Tonks

Fuel Modeling and Simulation Department

Idaho National Laboratory

208-526-6319

michae...@inl.gov

Sudipta Biswas

unread,
Oct 6, 2014, 5:33:50 PM10/6/14
to moose...@googlegroups.com
Thank you all, I will look into this & get back to you if I have any issue. 

Roma Gurung

unread,
May 2, 2015, 2:05:27 PM5/2/15
to moose...@googlegroups.com
Hi, 
I am going to understand about the application of phase field model in surface evolution of voids under electromigration.
Looking at the phase field modules under MOOSE, i found that the examples for $HOME/projects/moose/modules/phase_field/test/Parsed are more relevant in this context.
In particular, SplitCHParsed_test.i is an example, which i am trying to study for understanding the concepts.
My queries are:
1. Can i add the TimeDerivative kernel in 
[Kernels]
...
[../]

What other thing does this kernel effect in the solution of Cahn-Hilliard equation for the MOOSE model?

2. What is the role of 
[./time]
   type
=CoupledImplicitEuler
   
...
[../]

in connection to the TimeDerivative kernel?


Yours Sincerely
Anil Kunwar

Daniel Schwen

unread,
May 2, 2015, 3:35:15 PM5/2/15
to moose...@googlegroups.com
1. Can i add the TimeDerivative kernel in 
[Kernels]
...
[../]


You could, but don't! See below.

2. What is the role of 
[./time]
   type
=CoupledImplicitEuler
   
...
[../]

in connection to the TimeDerivative kernel?

CoupledImplicitEuler IS the time derivative Kernel (yes, we should rename this kerne!). It does the same thing as TimeDerivative EXCEPT it acts on a coupled variable. This effectively reorders your Jacobian Matrix. There was a time when this setup provided better convergence properties. I don't know if that is still the case (we should investigate this).
Let us know if this was not clear enough.
Daniel


Roma Gurung

unread,
May 2, 2015, 4:05:08 PM5/2/15
to moose...@googlegroups.com
Hi Daniel,
Thank you for clarifying my query.

Yours Sincerely
Anil Kunwar

Tonks, Michael R

unread,
May 2, 2015, 11:37:32 PM5/2/15
to moose...@googlegroups.com
I also recommend you see the documentation on the mooseframework wiki:


There were some typos in the tables, but they have been repaired.



--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

For more options, visit https://groups.google.com/d/optout.

Roma Gurung

unread,
May 3, 2015, 4:06:31 PM5/3/15
to moose...@googlegroups.com
Hi Michael and Daniel,
Looking at http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/, I understood a lot about how the kernel classes : CoupledImplicitEuler, SplitCHWRes, SplitCHParsed and SplitCHBase are utilized in representing the split form of Cahn-Hilliard equation in MOOSE. Now, i hope i can use these kernels or their derived classes for my mathematical model.
Let me ask you another question related to the [variable] block of MOOSE input file:
1. In Split form of Cahn-Hilliard equations, the variables are described as:
[Variables]
 
[./c]
   order
=FIRST
   family
= LAGRANGE
 
...
 
[../]
 
...
[../]

2. In non-split form of Residual equation of Cahn-Hilliard equation, let's say CHParsed_test.i, the variables are HERMITE polynomials of third order.
[Variables]
 
[./cv]
   order
=THIRD
   family
= HERMITE
 
...
 
[../]
[../]The order FIRST and THIRD could be generalized from the structure of the residual equations in these two forms, can

Although the order FIRST and THIRD could be understood easily from the structure of the residual equations in these two forms, could you please describe the relative significances of the famiy types : LAGRANGE and HERMITE in these two contexts? 

Yours Sincerely
Anil Kunwar

Tonks, Michael R

unread,
May 3, 2015, 10:43:00 PM5/3/15
to moose...@googlegroups.com
Roma,

The Lagrange and Hermite describe families of shape functions for the finite element method. I recommend you google them if you want more details.


For more options, visit https://groups.google.com/d/optout.

Roma Gurung

unread,
May 4, 2015, 7:52:07 AM5/4/15
to moose...@googlegroups.com
Hi Michael,
I am trying to add a Kernel Class namely CoupledPotential representing
the external electric field in split form of Cahn-Hilliard equation.
That is
R_u = CoupledImplicitEuler + SplitCHWRes +CoupledPotential
R_c = SplitCHParsed

I have prepared the ElectricPotential(
https://github.com/anilkunwar/danphe/blob/master/src/kernel/ElectricPotential.C
) as a derived class of Diffusion Kernel and I would like to couple
the potential variable with the "c" variable of CahnHilliard equation
through the CoupledPotential.C
(https://github.com/anilkunwar/danphe/blob/master/src/kernel/CoupledPotential.C).
Regarding the Physics of Coupled Potential, how do we represent in MOOSE code.
M*Div.c Grad(V)
where, M is constant
and V is voltage.

Can you please instruct me in what i have done in CoupledPotential.C :


Real
CoupledPotential::computeQpResidual()
{
return _mob[_qp] * _conductivity[_qp] * _potential_gradient[_qp] *
_u[_qp] * _test[_i][_qp];
}
Real
CoupledPotential::computeQpJacobian()
{
return _mob[_qp] * _conductivity[_qp] * _potential_gradient[_qp]
*_phi[_j][_qp] * _test[_i][_qp];
}
Real
CoupledPotential::computeQpOffDiagJacobian(unsigned int jvar)
{
if (jvar == _potential_var)
{
return _conductivity[_qp]*_phi[_j][_qp] * _u[_qp] * _test[_i][_qp];
}
return 0.0;
}


Yours Sincerely
Anil Kunwar
> You received this message because you are subscribed to a topic in the
> Google Groups "moose-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> moose-users...@googlegroups.com.
> Visit this group at http://groups.google.com/group/moose-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/moose-users/CA%2BEq24_AQAJd53GPU0R-0mJK8n-H51rw93tRYmxQu0N%2B%3Dva99Q%40mail.gmail.com.

Daniel Schwen

unread,
May 4, 2015, 9:25:26 AM5/4/15
to moose...@googlegroups.com
I am trying to add a Kernel Class namely CoupledPotential representing
the external electric field in split form of Cahn-Hilliard equation.
That is
R_u = CoupledImplicitEuler + SplitCHWRes +CoupledPotential
R_c = SplitCHParsed

I'm not sure if you are on the right track here. If you have a _potential_ you have an energy term. It would be better to Create a Material class derived from DerivativeFunctionMaterial to implement the free energy contribution of that external potential. That way you get proper coupling.

I have prepared the ElectricPotential(
https://github.com/anilkunwar/danphe/blob/master/src/kernel/ElectricPotential.C
) as a derived class of Diffusion Kernel and I would like to couple

Why is this derived from Diffusion? Do you really mean "derived" in a C++ sense, or do you mean "I copy-pasted the Diffusion kernel in a new file and changed it"?
 
Regarding the Physics of Coupled Potential, how do we represent in MOOSE code.
M*Div.c Grad(V)
where, M is constant
and V is voltage.

Check out the examples for obtaining the weak form expression. You need to apply the chain rule  and the Gauss-Divergence-Theorem. 

Can you please instruct me in what i have done in CoupledPotential.C :

For things that _you_ have done you will have to instruct _us_ ;-).
Anyhow, try to think about your problem in terms of the free energy. It might be simpler to solve.
Daniel 

Daniel Schwen

unread,
May 4, 2015, 9:34:28 AM5/4/15
to moose...@googlegroups.com

Actually your free energy contribution could be as simple as c*V

Roma Gurung

unread,
May 4, 2015, 12:53:44 PM5/4/15
to moose...@googlegroups.com
Hi Daniel,

I'm not sure if you are on the right track here. If you have a _potential_ you have an energy term. It would be better to Create a Material class derived from DerivativeFunctionMaterial to implement the free energy contribution of that external potential. That way you get proper coupling.
This potential is a voltage. I will try to relate it with energy term through the use of Material Class derived from DerivativeFunctionMaterial. Do we need to still couple it with the equation Div dot sigma_c* grad_v =0 ?


Why is this derived from Diffusion? Do you really mean "derived" in a C++ sense, or do you mean "I copy-pasted the Diffusion kernel in a new file and changed it"?
The derived class implies the C++ style. I inherited the class ElectricPotential.C from the base class Diffusion.C from the moose framework kernel. That is:
Real
ElectricPotential::computeQpResidual()
{
// sigma * grad_u * grad_phi[i]
return (_conductivity) * Diffusion::computeQpResidual();

}


Check out the examples for obtaining the weak form expression. You need to apply the chain rule  and the Gauss-Divergence-Theorem. 
Do i need to do this if i express the Electrical Potential contribution in free energy term?


For things that _you_ have done you will have to instruct _us_ ;-).
Anyhow, try to think about your problem in terms of the free energy. It might be simpler to solve.
Thank you for instructing me with a very useful concept.


Yours Sincerely
Anil Kunwar

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

Daniel Schwen

unread,
May 4, 2015, 12:58:12 PM5/4/15
to moose-users


> This potential is a voltage. I will try to relate it with energy term through the use of Material Class derived from DerivativeFunctionMaterial. Do we need to still couple it with the equation Div dot sigma_c* grad_v =0 ?

I don't think so. The evolution will be done through the phase field equations. See my other mail for the form of the free energy. Voltage times charge is energy (do you need a factor that connects concentration and charge).

> Do i need to do this if i express the Electrical Potential contribution in free energy term?

No.

Roma Gurung

unread,
May 4, 2015, 1:04:40 PM5/4/15
to moose...@googlegroups.com
Hi Daniel,
Actually your free energy contribution could be as simple as c*V.
Actually, i had thought that M*Div.c Grad(V) being different from dE_d/dc , i tried to place in R_u above. Now, from your guidance, i can proceed by placing Electrical Potential term in the free energy contribution in R_c . Also, this can make programming simpler. Thank you very much for the idea.

Yours Sincerely
Anil Kunwar  

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

Roma Gurung

unread,
May 4, 2015, 1:11:00 PM5/4/15
to moose...@googlegroups.com
Hi Daniel,
See my other mail for the form of the free energy.
I will study them well.Specially, the concept of DerivativeParsedMaterial in the solution of CahnHilliard equation is a brilliant work from MOOSE team.

Yours Sincerely
Anil Kunwar 

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

Daniel Schwen

unread,
May 4, 2015, 1:44:02 PM5/4/15
to moose...@googlegroups.com

Anil, you actually need no programming at all! This free energy contribution can be implemented using a DerivativeParsedMaterial.
Daniel


You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

Tonks, Michael R

unread,
May 4, 2015, 4:38:52 PM5/4/15
to moose...@googlegroups.com
The DerivativeParsedMaterial is an extremely powerful capability for the phase field module that Daniel added. I'm sure you will find it very valuable.

Mike




For more options, visit https://groups.google.com/d/optout.



--

Roma Gurung

unread,
May 5, 2015, 2:09:43 PM5/5/15
to moose...@googlegroups.com
Hi Daniel and Michael,
    I am trying to understand some features of DerivativeParsedMaterial.C and the following code snippet specially:
DerivativeParsedMaterial::DerivativeParsedMaterial(const std::string & name,
InputParameters parameters) :
DerivativeParsedMaterialHelper(name, parameters, USE_MOOSE_NAMES),
ParsedMaterialBase(name, parameters)
{
// Build function, take derivatives, optimize
functionParse(_function,
_constant_names, _constant_expressions,
getParam<std::vector<std::string> >("material_property_names"),
_tol_names, _tol_values);

}

And now in the input file, say FileName.i, as mentioned in the wiki,

[./free_energy] type = DerivativeParsedMaterial
block = 0
f_name = fbulk
args = c
constant_names = W
constant_expressions = 1.0/2^2 # material_property_names = W
function = W*(1-c)^2*(1+c)^2
enable_jit = true
outputs = exodus
[../]

Queries:
1. If we try to express through material_property_names, where do we need to assign the numerical value of W. Is this supplied through constant_expressions?

2.  I went through the auxkernels TotalFreeEnergy.C, and there i could see kappa_names and _additional_free_energy, in TotalFreeEnergyBase.C to account for other parameters required for SplitCHParsed kernel (http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/). 
When i have to write the free energy contribution due to electrical field, with the voltage varying from 0 at one end to V at another end of domain; how do i represent it in the input file. Either as"
[AuxKernels]
  [./localenergy]
       type =  TotalFreeEnergyBase
        ...
       How do i represent additional_free_energy due to external voltage?
        ...
  [../]
 [../] 
 or, do i just need to add it in the DerivativeParsedMaterial. in function by defining constant name and constant expression for voltage?


Yours Sincerely
Anil Kunwar

Daniel Schwen

unread,
May 5, 2015, 2:39:44 PM5/5/15
to moose...@googlegroups.com
1. If we try to express through material_property_names, where do we need to assign the numerical value of W. Is this supplied through constant_expressions?

Whatever provides your material property is fine. One option is teh GenericConstantMaterial.
I am currently working on properlty generating the chain rule derivatives of embedded material properties (of course for constant those are just zero).
 
 or, do i just need to add it in the DerivativeParsedMaterial. in function by defining constant name and constant expression for voltage?

The latter. You need to add it in the Derivative parsed material. Please take a look at DerivativeSumMaterial as well. It allows you to combine multiple free energy contributions (in case you want to cleanly separate the chemical and electrostatic contributions to your free energy).
BUT your voltage would NOT be a constant. You need to set up a gradient. I suggest using an AuxVariable for V with an appropriate initial condition (for example a FunctionIC with function = 'x*someconstant')

Daniel
 

Roma Gurung

unread,
May 6, 2015, 12:53:15 PM5/6/15
to moose...@googlegroups.com
Hi Daniel,
I have understood how to use DerivativeSumMaterial along with DerivativeParsedMaterial. Also, i have looked about some tutorials of GenericConstantMaterial.

Regarding the use of FunctionIC and AuxVariable for "Voltage" representation, I am still not totally clear. I tried to study the following input file https://github.com/idaholab/moose/blob/devel/test/tests/functions/function_ic/function_ic_test.i.
In this tutorial,which of  the variables "u" and the AuxVariable "u_aux" for diffusion equation correspond to the voltage "V" , as i see both of them have the same function_ic? Is the variable "u_aux" representing the value of "u",being be used as a variable "V" in the "c*V" expression, provided that c is the phase field variable?

Yours Sincerely
Anil Kunwar

Daniel Schwen

unread,
May 6, 2015, 1:12:45 PM5/6/15
to moose...@googlegroups.com
representation, I am still not totally clear. I tried to study the following input file https://github.com/idaholab/moose/blob/devel/test/tests/functions/function_ic/function_ic_test.i.
In this tutorial,which of  the variables "u" and the AuxVariable "u_aux" for diffusion equation correspond to the voltage "V" , as i see both of them have the same function_ic? Is the variable "u_aux" representing the value of "u",being be used as a variable "V" in the "c*V" expression, provided that c is the phase field variable?


This example does not translate directly to your problem. It just illustrates how you can use a function to initialize both a non-linear and an auxiliary variable. The just happen to use the same function.
Daniel

Roma Gurung

unread,
Jun 30, 2015, 2:35:21 PM6/30/15
to moose...@googlegroups.com
Hi, 
I am thankful to Michael and MOOSE team for making the SplitCHSoret (phase field model for pore migration under temperature gradient) available withing the MOOSE framework. I am trying to learn the techniques used in the model.
Let me ask some questions related to SplitCHSoret_test.i or Phase Field Module otherwise:
1.) Is the CoupledTimeDerivative the new name for CoupledImplicitEuler?

2.) The polynomial_order = 8 in [Global Params] is 8? What is its significance?

3. Within the [variables] block, [./w], there is scaling set as
[./w]
scaling = 1.0e3
[../]

Similarly, in SplitCHSoret_temp_test.i, there is the scaling = 1.0e5 set in temperature variable [./T].
What are the roles of these scaling magnitudes in the numerical methodology?

4. If we have to set, g(c) = scaling coefficient , used for confining vacancy flux within the surface domain, mentioned in Liangzhe Zhang et al,, Comp. Mater. Sci. , Vol. 56 (2012), pp. 161-165, is my guess correct that we should multiply the mobility by the scaling coefficient's value?


Yours Sincerely
Anil Kunwar



Yours Sincerely
Anil Kunwar

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

Tonks, Michael R

unread,
Jun 30, 2015, 2:47:03 PM6/30/15
to moose...@googlegroups.com
Anil,

I will answer your questions one at at time:

1) Yes, CoupledTimeDerivative is the new (and much more accurate) name for CoupledImplicitEuler. It has also been moved into framework, since many models use time derivatives from other variables.

2) In the tests, I am using a quantitative polynomial free energy defined by the PolynomialFreeEnergy material. For more info, see http://mooseframework.org/wiki/PhysicsModules/PhaseField/QuantitativePolynomialFreeEnergies/

3) The scaling parameter in the materials block is a means of scaling your residuals and jacobians. This scaling has no impact on the converged solution, but can often help with convergence when the residuals for various variables have different magnitudes.

4) The scaling parameter has nothing to do with the scaling mentioned in the paper. That parameter changes the way the diffusion is defined to account for different diffusion mechanisms. That portion of the model form the paper has not been implemented in the phase field module. The main reason is we have actually gone away from that approach and are rather using a tensor mobility to only allow diffusion in certain directions. We are currently trying to figure out an elegant way of including that in the phase field module. You should be able to easily implement the approach from the L Zhang paper if you choose to do so.



--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roma Gurung

unread,
Jun 30, 2015, 3:30:16 PM6/30/15
to moose...@googlegroups.com
Hi Michael,
1. I had seen that CoupledTimeDerivative was notified several days ago in github "Use CoupleTImeDerivative name in input files (#5286)"
    But i had not known then that it was the NEW and MOOSE framework name for CoupledImplicitEuler as mentioned in the link https://github.com/idaholab/moose/issues/5286. Thank you for informing this. MOOSE is characterized by a higher frequency of updates in many features. So, we need to stay tuned with it.

2. Today, i learnt the term Quantitative Two Phase Polynomial Free Energies. So, in MOOSE, we would have :
[Global Params] 
polynomial_order = 4 or 6 or 8.
[]
I came to know that we are using polynomial free energy instead of double-well free energy in this tutorial. Thank you for enabling me learn about the concept of polynomial free energy.

3. and 4. Thank you for informing me in detail about the scaling coefficients and associated numerical methodology.

5. A newer question: Earlier Daniel had commented somewhere that as fields like Temperature (T) and Potential (V) have some free-energy contribution associated with them. Is there a possibility to derive a material class from the DerivativeFunctionMaterial
 class for the effect of temperature field and couple it with the heat conduction equation rather than use the function = A + B.T, where T is temperature in [AuxKernels] block?


Yours Sincerely
Anil Kunwar




Daniel Schwen

unread,
Jun 30, 2015, 4:03:50 PM6/30/15
to moose...@googlegroups.com
5. A newer question: Earlier Daniel had commented somewhere that as fields like Temperature (T) and Potential (V) have some free-energy contribution associated with them. Is there a possibility to derive a material class from the DerivativeFunctionMaterial
 class for the effect of temperature field and couple it with the heat conduction equation rather than use the function = A + B.T, where T is temperature in [AuxKernels] block?

You can certainly derive a new material class from DerivativeFunctionMaterialBase [1], but I strongly suggest that you try implementing the model with a DerivativeParsedMaterial first.
Daniel

Tonks, Michael R

unread,
Jun 30, 2015, 5:49:01 PM6/30/15
to moose...@googlegroups.com
Anil,

When you have a temperature dependent mobility and free energy, temperature gradient terms come automatically out of the Cahn-Hilliard equation. In that case, you would only need to SplitCHParsed. However, when you are using a polynomial free energy without temperature dependence, you have to artificially add the temperature gradient driving force, as we did here.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

For more options, visit https://groups.google.com/d/optout.

Tonks, Michael R

unread,
Jul 1, 2015, 11:40:57 AM7/1/15
to moose...@googlegroups.com
As a quick update, SplitCHSoret has changed names. We adjusted it to work for both the split and direct solve of the Cahn-HIlliard equation, so it is now call SoretDiffusion. See phase_field/tests/SoretDiffusion.

Mike

Roma Gurung

unread,
Jul 1, 2015, 3:54:31 PM7/1/15
to moose...@googlegroups.com
Hi Daniel and Michael,
Thank you very much for your conceptual illustrations on coupling Temperature field with the Cahn-Hilliard phase field model.

Yours Sincerely
Anil Kunwar

You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.

Roma Gurung

unread,
Jul 4, 2015, 2:09:49 PM7/4/15
to moose...@googlegroups.com
Hi,
As an exercise, i have tried to learn SoretDiffusion tutorial by coupling Heat Conduction Equation with the Cahn Hilliard Equation (Phase FIeld Equation).
The input file was modified from the SoretDiffusion test input file and has the following structure:
[Mesh]
 type = GeneratedMesh
 dim = 2
 xmax = 1000
 ymax = 1000
 nx = 50
 ny = 50
[]
[GlobalParams]
 polynomial_order = 8
[]
[Variables]
 [./T]
 [../]
 [./c]
 [../]
 [./w]
     scaling = 1.0e3
 [../]
[]
[ICs]
 [./c_IC]
    type = SmoothCircleIC
    x1 = 175.0
    y1 = 0.0
    radius = 100
    invalue = 1.0
    outvalue = 0.01
    int_width = 100.0
    variable = c
 [../]
[]
#[AuxVariables]
#[./T]
#[../]
#[]
[Kernels]
 [./heat_conduction]
    type = HeatConduction
    variable = T
 [../]
 [./c_res]
    type = SplitCHParsed
    variable = c
    kappa_name = kappa
    w = w
    f_name = F
 [../]
 [./w_res]
    type = SplitCHWRes
    variable = w
    mob_name = M
 [../]
 [./w_res_soret]
    type = SoretDiffusion
    variable = w
    c = c
    T = T
    diff_name = D
    Q_name = Qstar
 [../]
 [./time]
    type = CoupledTimeDerivative
    variable = w
    v = c
 [../]
[]
#[AuxKernels]
# [./Temp]
#    type = FunctionAux
#    variable = T
#    function = 1000.0+0.025*x
# [../]
#[]
[BCs]
  [./bottom_temperature]
    type = DirichletBC
    variable = T
    boundary = bottom
    value = 350 # (C)
  [../]
  [./top_temperature]
    type = DirichletBC
    variable = T
    boundary = top
    value = 348 # (C)
  [../]
[Materials]
 [./Copper]
    type = PFParamsPolyFreeEnergy
    block = 0
    c = c
    T = T # K
    int_width = 80.0
    length_scale = 1.0e-9
    time_scale = 1.0e-6
    D0 = 3.1e-5 # m^2/s, from Brown1980
    Em = 0.71 # in eV, from Balluffi1978 Table 2
    Ef = 1.28 # in eV, from Balluffi1978 Table 2
    surface_energy = 0.708 # Total guess
 [../]
 [./Cu_cond]
    type = GenericConstantMaterial
    block = 0
    prop_names = thermal_conductivity
    prop_values = 73 # K: (W/m*K) from wikipedia @296K
  [../]
 [./free_energy]
    type = PolynomialFreeEnergy
    block = 0
    c = c
    outputs = exodus
    derivative_order = 2
 [../]
[]
[Preconditioning]
 [./SMP]
    type = SMP
    full = true
 [../]
[]
[Executioner]
    type = Transient
    scheme = 'bdf2'
    solve_type = 'NEWTON'
    petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
    petsc_options_value = 'asm 31 preonly lu 1'
    l_max_its = 10
    l_tol = 1.0e-4
    nl_max_its = 25
    nl_rel_tol = 1.0e-9
    start_time = 0.0
    num_steps = 20
    dt = 3
[]
[Outputs]
    output_initial = true
    exodus = true
    print_perf_log = true
[]
When i tried to run the input file, the solve did not converge with the following message.
The log_file is attached herewith. What is the cause of the "convergence" issue?

Yours Sincerely
Anil Kunwar 
phase_field_log_file.pdf

Tonks, Michael R

unread,
Jul 4, 2015, 6:45:34 PM7/4/15
to moose...@googlegroups.com
Roma,

I think that your best bet would be to start with phase_field/tests/SoretDiffusion/split_temp_test.i and modify it. I took that test and made it 2D in the attached input file.

Other things you should think about:

- The units are set in the material block, and the units in PFParamsPolyFreeEnergy are Kelvin for temperature, "length_scale" for length and "time_scale" for time. So, you need to make sure that your thermal conductivity is in the same units (in your input file you used W/mK for the thermal conductivity even though length_scale = 1e-9 (nm) and time_scale = 1e-6 (microsec).
- If you decrease the temperature, the diffusivity goes down exponentially, so you will need to increase the time scale or evolution will occur VERY slowly
- Your temperature boundary conditions need to be in the same units as in your material (K in this case)




For more options, visit https://groups.google.com/d/optout.
split_ex.i

Roma Gurung

unread,
Jul 5, 2015, 1:50:17 PM7/5/15
to moose...@googlegroups.com
Hi Michael,
Looking at your input file, i noted that i had not put "Initial Condition" on temperature variable. Putting it , the solver seem to be more converged than before.
Moreover, i need to try with the length scales, time scales and other suggestions given by you to ensure the convergence of the solve.I am happy to learn many concepts about MOOSE framework.

Yours Sincerely
Anil Kunwar

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/4qzSmJJlI_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.

Roma Gurung

unread,
Jul 7, 2015, 2:46:16 PM7/7/15
to moose...@googlegroups.com
Hi,
I would like to see the shape evolution of surface voids due to voltage gradient and i gave a try using the following input file:
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmax = 500
ymax = 500
elem_type = QUAD4
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e2
[../]
[./volt]
initial_condition = 1000
scaling = 1.0e5
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 125.0
y1 = 250.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 100.0
variable = c
[../]
[]
[Kernels]
[./electrical_potential]
type = MatDiffusion
variable = volt
D_name = electrical_conductivity
[../]
#[./electric_potential]
# type = ElectricPotential
# variable = volt
# conductivity = 73 # (W/m K) From NIST leadfree solder database
# [../]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./w_res_voltage]
type = SplitCHVoltage
variable = w
c = c
volt = volt
diff_name = D
z_name = zeff
T = T
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./bottom_volt]
type = DirichletBC
variable = volt
boundary = bottom
value = 1024
[../]
[./top_volt]
type = DirichletBC
variable = volt
boundary = top
value = 1000
[../]
[]
[Materials]
[./Copper]
type = VoltPFParamsPolyFreeEnergy
block = 0
c = c
volt = volt
T = T # K
int_width = 60.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./elcond]
type = ParsedMaterial
block = 0
args = 'c'
function = 'if(c>0.7,1.0e-8,5.5e-8)'
f_name = electrical_conductivity
outputs = exodus
[../]
[./free_energy]
type = PolynomialFreeEnergy
block = 0
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
num_steps = 60
dt = 20.0
[]
[Outputs]
output_initial = true
interval = 1
exodus = true
print_perf_log = true
[]
Where, VoltPFParamsPolyFreeEnergy is the modified Class of  PFParamsPolyFreeEnergy and
SplitCHVoltage is the modified class for SoretDiffusion.
However, the shape evolution of void is not seen pronounced. What are the numerical parameters that need to be checked to observe it:
1) surface diffusivity (D_s)
2) kappa ?


Yours Sincerely
Anil Kunwar

Tonks, Michael R

unread,
Jul 8, 2015, 4:30:30 PM7/8/15
to moose...@googlegroups.com
If the solve is converging but the concentration appears to not evolve, then your time step is too small or your diffusivity is too small (increasing either one should have the same effect).

If the concentration is evolving but it isn't impact by the voltage, then your driving force in SplitCHVoltage may be too small.


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages