|
[Sponsors] |
May 19, 2020, 13:38 |
finite area method, depth averaged model
|
#1 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
Hi foamers,
I am developing (with a colleague) a depth average flow model for viscoplastic debris flow ( fluids with yield stress) based finite area method libraries. The flow model has a two years of the same material; layer 1, a shearing layer with hs and layer 2, plug layer with hp and the total depth of flow is h = hp+hs. One of the physical equation is: I coded it as: [/fam::ddt(Up) + Up & fac::grad(Up) + 1. 0/ rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up) ] And I got the following compiling error: " error: no match for ‘operator+’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::faPatchField, Foam::areaMesh> >’ and ‘Foam::tmp<Foam::faMatrix<Foam::Vector<double> > >’) + Up & fac::grad(Up) ~~~~~~~~~~~~~ + 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up) error: no match for ‘operator+’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::faPatchField, Foam::areaMesh> >’ and ‘Foam::tmp<Foam::faMatrix<Foam::Vector<double> > >’) + Up & fac::grad(Up) ~~~~~~~~~~~~~ + 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up) " Is there any way to write in openfoam? |
|
May 19, 2020, 14:28 |
|
#2 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 |
I tried to derive an alternative expression from:
Rearranging: Then I coded it as: [ fam::ddt(Up) + fam::div(phip, Up) - fam::Sp(fac::div(phip), Up) + 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up) == gs - gn * fac::grad(h)] where gn = g & n( normal) and gs = g -gn &n The compilation went Ok. However a run on a trial case of 1D flume with inlet and outlet gave the following log: " Courant Number mean: 0.000277993 max: 0.000277993 velocity max magnitude: 0.0138996 deltaT = 0.000120482 Time = 0.000120482 DILUPBiCG: Solving for Upx, Initial residual = 1, Final residual = 1.53502e-17, No Iterations 1 DILUPBiCG: Solving for Upy, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Upz, Initial residual = 0, Final residual = 0, No Iterations 0 " It stopped without warning. it couldn't continue to the next equation. Any help please! Thanks, Gebray |
|
Tags |
finite area method |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam wave propagation and explosion of Courant number and residuals | ChiaraViola | OpenFOAM Running, Solving & CFD | 1 | June 26, 2019 06:36 |
finite area method doesn't work in parallel (foam-extend-4.0) | andlog | OpenFOAM Bugs | 8 | December 11, 2017 12:04 |
The finite element method - “displacement” or “stiffness” method | 3Lin7 | ANSYS | 0 | February 15, 2013 19:36 |
The aspect ratio of the volume elements in Finite Volume Method | CharlieTan84 | Main CFD Forum | 3 | August 28, 2012 03:34 |
finite volume method | co2 | FLUENT | 0 | March 1, 2004 13:24 |