|
[Sponsors] |
Matrix manipulation without use of a dictionary ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 13, 2022, 22:51 |
Matrix manipulation without use of a dictionary ?
|
#1 |
Member
Join Date: Mar 2019
Posts: 86
Rep Power: 7 |
Good evening
I want to assign A and b in Ax=b where x is my scalar field: fvScalarMatrix xEqn ( fvm::ddt(x) + ...... ) ; xEqn.internalCoeffs()[patchid]= whatever; xEqn.boundaryCoeffs()[patchid]= whatever; xEqn.solve(); I could not run the program without getting a complaint about patch type and constraint type required under file 0/x. i.e., I had to add something like boundaryField { patchname { type mixed; valueFraction uniform 0.0; refValue uniform 0.0; refGradient uniform 0.0; } in that file 0/x I chose mixed because it seems to be the most general generic boundary condition in OpenFOAM. It would have been nice if the dictionary had not been required and I hope that my above addition to 0/x does not nullify the above assignment in my program. Any comments welcome |
|
October 16, 2022, 13:17 |
|
#2 |
Member
Join Date: Mar 2019
Posts: 86
Rep Power: 7 |
The good news is that adding
forAll(patchname, i) { Info<< " intCoeff = " << xEqn.internalCoeffs()[patchid][i] << " bndCoeff = " << xEqn.boundaryCoeffs()[patchid][i] << " s\n" << endl; } after the 3 lines xEqn.internalCoeffs()[patchid]= bigfixednumber1; xEqn.boundaryCoeffs()[patchid]= bigfixednumber2; xEqn.solve(); clearly indicates that the above values are not modified by the dictionary boundaryField { patchname { type mixed; valueFraction uniform 0.0; refValue uniform 0.0; refGradient uniform 0.0; } in file 0/x |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Matrix manipulation | Za-ck | OpenFOAM Programming & Development | 0 | July 18, 2018 06:44 |
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary | Struggle_Achieve | OpenFOAM Pre-Processing | 2 | December 20, 2017 04:58 |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 23:03 |
OpenFOAM version 1.6 details | lakeat | OpenFOAM Running, Solving & CFD | 42 | August 26, 2009 22:47 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |