|
[Sponsors] |
How to represent laplacian of a product of multiple terms? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 14, 2019, 12:44 |
How to represent laplacian of a product of multiple terms?
|
#1 |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
This is represented as Code:
solve ( fvm::ddt(rho, U) + fvm::div(phi, U) - fvm::laplacian(mu, U) == - fvc::grad(p) ) My question is: How to represent laplacian of an expression which involves product of more terms involving various operators. e.g. I know that following is not right: Code:
fvm::laplacian((X/Y*mag(Z)), U) |
|
February 14, 2019, 12:54 |
|
#2 |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
fvm::Sp( fvc::laplacian((X/Y*mag(Z)), U)? Notice I have fvc so that it solves for the laplacian explicit and then it multiplies U and that goes to the diagonal, but once again I've never tried this so that might be wrong. |
|
February 14, 2019, 13:07 |
|
#3 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
Thanks for a quick reply. But no, this doesn't work. The error is: Code:
error: no matching function for call to ‘Sp(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’ ); ^ Code:
note: candidate expects 2 arguments, 1 provided ); ^ |
||
February 14, 2019, 13:24 |
|
#4 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
I'm just curious if fvm::laplacian compiles? There's also SuSp fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment |
||
February 14, 2019, 13:32 |
|
#5 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
The core issue I think is handling this term here: "X/Y * mag(Z)". |
||
February 14, 2019, 13:38 |
|
#6 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
|
||
February 14, 2019, 13:41 |
|
#7 |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
||
February 14, 2019, 13:48 |
|
#8 |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
||
February 14, 2019, 13:56 |
|
#9 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
Compilation worked with simple fvm::laplacian in my first post. But case failed citing wrong dimensions. This was bound to happen because I was prompted to have a term in fvSchemes for a physically unrealistic quantity (e.g. laplacian of X/mag(Z)*mag(Z) instead of expected laplacian of X/mag(Y)*mag(Z).. as in the original expression). This led me think I'm not representing it right. With fvm::Sp it never managed to compile. Same error everytime. I just also tried changing the sequence of Sp and laplacian. Doesn't work. Code:
fvm::laplacian(fvc::Sp(1/Y, fvc::Sp(X,mag(Z))), U) Last edited by deepbandivadekar; February 14, 2019 at 14:02. Reason: Not div, laplacian |
||
February 14, 2019, 14:06 |
|
#10 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
|
||
February 14, 2019, 14:27 |
|
#11 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
Weird error: Code:
--> FOAM FATAL IO ERROR: keyword laplacian(laplacian( file: <path to case folder>/system/fvSchemes.laplacianSchemes from line 37 to line 41. What does that even mean!? |
||
February 14, 2019, 15:47 |
|
#12 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
If you could post your schemes file that might help someone see something that was overlooked or maybe you could just upload the parts of your project that are necessary to see the problem, not the whole thing (unless you don't mind). Best regards! |
||
February 15, 2019, 09:58 |
|
#13 |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Thanks for your help so far nonetheless. I also tried to change the order of terms and it doesn't change the situation much.
I'll try to share more if I can soon. |
|
February 15, 2019, 11:54 |
|
#14 | |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
Quote:
Basically you solve for that part separately and then solve the Laplacian by taking the divergence of the gradient literally. |
||
February 18, 2019, 12:04 |
|
#15 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
So, I was wondering if there's any way to print the dimensions of a certain quantity (with or without the value) as the solver runs? I bumped up an old thread here if you want to see what I mean. |
||
March 17, 2020, 11:09 |
|
#16 | |
Member
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9 |
Quote:
Have you solved your problem? I would like to ask you if fvm::laplacian can have three terms or it just can have 2 terms. Have you tried with something like this? Code:
- fvm::laplacian ( fvc::interpolate(alpha) *fvc::interpolate(this->turbulence().nut()*rho/Sc_), Yi ) Actually, I'm not sure what fvc::interpolate does but there's a product and division at the second term nut*rho/Sc .... Regards, |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MULES with source terms and multiple phases | tgvosk | OpenFOAM Running, Solving & CFD | 8 | March 21, 2018 07:14 |
Question in definition of terms in solve | titio | OpenFOAM Running, Solving & CFD | 0 | March 19, 2009 17:02 |
Doubts on how to represent some terms for viscoelastic Flow Simulation | titio | OpenFOAM Running, Solving & CFD | 0 | February 4, 2009 08:42 |
Multiple species and UDS source terms | Ale | FLUENT | 2 | September 9, 2002 04:45 |
K-Epsilon model? | Brindaban Ghosh | Main CFD Forum | 2 | June 24, 2000 05:22 |