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

Is good initial guess field is neccessary ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2012, 13:28
Default Is good initial guess field is neccessary ?
  #1
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi foamers,
i developed my own solver for predicting velocity profile(U) and particle concentration profile(T) for suspension flow (fluid+particles). And in my momentum equation, the viscosity is not constant, it is function of particle volume fraction(T).
And i written the momentum equation as follows:

tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::laplacian(nu*pow(1-T/0.68,-1.82), U)
);
UEqn().relax();

sources.constrain(UEqn());

solve(UEqn() == -fvc::grad(p));


where T is the particle volume fraction (dimensionless scalar field).

For predicting particle volume fraction(T), the governing equation written as:

solve
(
fvm::div(phi, T)
- fvm::laplacian(0.62*1.82*pow(a,2)*g*pow(T,2)*pow(0 .68-T,-1), T)
- fvm::laplacian(0.41*pow(a,2)*g*T, T)
==
fvc::laplacian(0.41*pow(a,2)*T*T, g)
);


Where g = local shear rate
= sqrt(2*E:E)
= 1.4142*sqrt(magSqr(symm(fvc::grad(U))))

when i run my case (simple channel flow) by using my solver, initially it is giving the following error.


error message:-


Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading field T

Reading/calculating face flux field phi

No field sources present


SIMPLE: convergence criteria
field p tolerance 0.01
field U tolerance 0.001
field T tolerance 1e-05


Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 4.00548e-06, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
#0 Foam::errorprintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 FoamDILUPreconditioner::calcReciprocalD(Foam::Fi eld<double>&, Foam::lduMatrix const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 FoamDILUPreconditionerDILUPreconditioner(Foam: :lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#5 Foam::lduMatrixpreconditioner::addasymMatrixCons tructorToTable<FoamDILUPreconditioner>::New(Foam ::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#6 Foam::lduMatrixpreconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#7 FoamPBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#8 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#9 Foam::fvMatrix<double>::solve() in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
#10
in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
#11 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#12
in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
Floating point exception
malli_reddy@ubuntu:~/OpenFOAM/malli_reddy-2.1.1/PROJECT/myDiffusive$


But when i give good initial guess (by running the same case by using another solver in which coefficients are constants), then the case is running and giving good results. My geometry is 2D channel flow. when i run my case with checkMesh, it given no errors.


And i used SIMPLE scheme for pressure velocity coupling. And for
laplacian() Gauss linear corrected;
div() Gauss linear;


To generalize my solver should i shift to any other schemes?
Thanks in advance

cheers
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   October 11, 2012, 01:44
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
My guess would be, that the first time you solve the equation for T, g=0, which is causing problems in the matrix equation you are constructing. When you have a non-constant initial velocity, g evaluates to non-zero value. Maybe you can calculate g at the end of a time-step and initialize it with a non-zero value?
Bernhard is offline   Reply With Quote

Old   October 11, 2012, 02:08
Default
  #3
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Bernhard,
Thanks for quick reply.
For g i given the following boundary conditions:-

dimensions [0 0 -1 0 0 0 0];

internalField uniform 10;

boundaryField
{
leftWall
{
type calculated;
}

fixedWalls
{
type calculated;
}

rightWall
{
type calculated;
}

frontAndBack
{
type empty;
}
}


Initially i given uniform 0 for internal fields. According to your suggestion i changed it to 10. But the result is same (giving error). I given non zero for internal fields only. Could you please tell me how to give non zero for boundary patches also.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   October 11, 2012, 02:13
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I am not sure how you defined g in the solver, but do you really need an 0/g file? Cannot you define this field just in the solver? Also does it not conflict with gravity? How do you initialize T?
Bernhard is offline   Reply With Quote

Old   October 11, 2012, 02:28
Default
  #5
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi bernhard,
I can define g in the solver. But i am using groovyBC for T. In that i need g. For that i defined g as volScalarField. I don't know actually, whether it conflict with gravity or not.

I initialized T as:

dimensions [0 0 0 0 0 0 0];

internalField uniform 0.02;

boundaryField
{
leftWall
{
type fixedValue;
value uniform 0.4;
}
fixedWalls
{
type groovyBC;
g g;
gradientExpression "-0.41*T*snGrad(g)/(g*(0.41+T*1.1284*pow(0.68-T, -1)))";
fractionExpression "0";
evaluateDuringConstruction 0;
variables "";
timelines (
);
lookuptables (
);
}
rightWall
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   October 17, 2012, 12:58
Default
  #6
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Bernhard,
I don't know whether i should dig here or not. I am thinking this thread is still alive. I have not solved my problem. Is there any suggestions about it?

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Reply


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13
MRFSimpleFOAM goes divergenced! renyun0511 OpenFOAM Running, Solving & CFD 0 November 19, 2009 02:11
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


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