# [Thank you for help] How comes this modified lapalacianFoam can not be 'wmake'?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 5, 2011, 15:17 #2 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 262 Rep Power: 11 Hi Merlin! Your code can't compile. Indeed, your first declaration is a non-sense: alphadot is not a matrix. In fact it is just a field that depends on the other variables. Code: ```volScalarField alphadot = (a1*exp(-d1/R/T)+a2*exp(-d2/R/T)*alpha^m)*(1-alpha)^n; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { solve ( fvm::ddt(T) - fvm::laplacian(KRhoC, T)- HC*alphadot ); //add line here// solve ( fvm::ddt(alpha) - alphadot ); //addition end// }``` This snippet should work.. You can even optimise the resolution using fvm::Sp() to deal with the source term of your last equation... @++ Cyp

March 6, 2011, 14:45
#3
New Member

Wei Ma
Join Date: Feb 2011
Posts: 14
Rep Power: 8
Quote:
 Originally Posted by Cyp Hi Merlin! Your code can't compile. Indeed, your first declaration is a non-sense: alphadot is not a matrix. In fact it is just a field that depends on the other variables. Code: ```volScalarField alphadot = (a1*exp(-d1/R/T)+a2*exp(-d2/R/T)*alpha^m)*(1-alpha)^n; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { solve ( fvm::ddt(T) - fvm::laplacian(KRhoC, T)- HC*alphadot ); //add line here// solve ( fvm::ddt(alpha) - alphadot ); //addition end// }``` This snippet should work.. You can even optimise the resolution using fvm::Sp() to deal with the source term of your last equation... @++ Cyp
Hi Cyp,
Appreciate your help pretty much. I think it makes a lot of sense to me.
But...
After changing my code to those you provide, the same error occurred.
I think I should paste createFields.H here:

Info<< "Reading field T\n" << endl;

volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::AUTO_WRITE
),
mesh
);

Info<< "Reading field alpha\n" << endl;

volScalarField alpha
(
IOobject
(
"alpha",
runTime.timeName(),
mesh,
IOobject::AUTO_WRITE
),
mesh
);

Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::NO_WRITE
)
);

Info<< "Reading KRhoC\n" << endl;

dimensionedScalar KRhoC
(
transportProperties.lookup("KRhoC")
);

Info<< "Reading HC\n" << endl;

dimensionedScalar HC
(
transportProperties.lookup("HC")
);

Info<< "Reading cureProperties\n" << endl;

IOdictionary cureProperties
(
IOobject
(
"cureProperties",
runTime.constant(),
mesh,
IOobject::NO_WRITE
)
);

Info<< "Reading a1\n" << endl;

dimensionedScalar a1
(
cureProperties.lookup("a1")
);

Info<< "Reading a2\n" << endl;

dimensionedScalar a2
(
cureProperties.lookup("a2")
);

Info<< "Reading d1\n" << endl;

dimensionedScalar d1
(
cureProperties.lookup("d1")
);

Info<< "Reading d2\n" << endl;

dimensionedScalar d2
(
cureProperties.lookup("d2")
);

Info<< "Reading R\n" << endl;

dimensionedScalar R
(
cureProperties.lookup("R")
);
Info<< "Reading m\n" << endl;

dimensionedScalar m
(
cureProperties.lookup("m")
);
Info<< "Reading n\n" << endl;

dimensionedScalar n
(
cureProperties.lookup("n")
);

actually, I cant find anything special here....I stored KRhoC and HC in transportproperties, and other parameters in cureProperties.
Sorry for bothering you and other guys again.

 March 6, 2011, 15:06 #4 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 262 Rep Power: 11 Hi! Your last error comes from the power in your alphadot expression : in c++ a^b is pow(a,b). Now, your code should compile perfectly. Best, Cyp

March 6, 2011, 16:17
#5
New Member

Wei Ma
Join Date: Feb 2011
Posts: 14
Rep Power: 8
Quote:
 Originally Posted by Cyp Hi! Your last error comes from the power in your alphadot expression : in c++ a^b is pow(a,b). Now, your code should compile perfectly. Best, Cyp
Hi, Cyp
You are the MAN !! It has been complied smoothly.

Grateful for your instruction and learnt a lot from your suggestion!

Merlin-
Truly

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post flakid OpenFOAM Installation 16 December 28, 2010 09:48 bucksfan OpenFOAM Installation 19 August 4, 2009 01:36 tryingof OpenFOAM Bugs 17 December 7, 2008 05:41 erik_d OpenFOAM Bugs 13 September 13, 2008 21:45 joey OpenFOAM Paraview & paraFoam 1 October 2, 2006 13:28

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

 Contact Us - CFD Online - Privacy Statement - Top