|
[Sponsors] |
August 3, 2023, 11:01 |
|
#21 | |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
Quote:
Just a step back, would there any high-level controls that allow the fvVectorMatrix to solve for specific components? For example, I want to solve Ux, Uy, but not Uz. I look into the code and it looks like I have to write a new class for this purpose. What is your opinion? Thanks, Rdf |
||
August 8, 2023, 13:03 |
|
#22 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
Hi Rdf,
One way to control which components are solved by fvVectorMatrix is to manipulate the "empty" directions. For example, by default, fvVectorMatrix will not solve in an empty direction (like for a 2-D case). In the code, you could hack the empty directions, e.g. Code:
Vector<label>& solD = const_cast<Vector<label>&>(mesh.solutionD()); // Enable solution in the X direction solD[vector::X] = 1; // Enable solution in the Y direction solD[vector::Y] = 1; // Disable solution in the Z direction solD[vector::Z] = -1; |
|
Tags |
fvm::laplaciantranspose, pucoupledfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What does mean Operation Source in fvVectorMatrix ( .H())? | EmadTandis | OpenFOAM Programming & Development | 2 | April 29, 2011 07:03 |
FvVectorMatrix questions | stephan | OpenFOAM Running, Solving & CFD | 6 | May 4, 2007 07:23 |
Matrix | shuo | OpenFOAM Running, Solving & CFD | 4 | October 23, 2006 04:09 |
FvVectorMatrix | cfdengineering | OpenFOAM Running, Solving & CFD | 0 | December 1, 2005 10:51 |