|
[Sponsors] |
September 11, 2018, 11:44 |
vectorCodedSource - only the x-component?
|
#1 |
New Member
Craig White
Join Date: Nov 2013
Posts: 11
Rep Power: 12 |
Hi,
I have a working vectorCodedSource: Code:
momentumSource { type vectorCodedSource; active on; selectionMode cellSet; cellSet ionicWindRegion; vectorCodedSourceCoeffs { fieldNames (U); redirectType velocitySource; codeCorrect #{ Pout<< "**codeCorrect**" << endl; #}; codeAddSup #{ Pout << "***codeAddSup***" << endl; #}; codeSetValue #{ Pout<< "**codeSetValue**" << endl; cellSet selectedCells(mesh_, cellSetName_); labelList cells = selectedCells.toc(); vectorField values(cells.size()); forAll(cells, i) { scalar ccX = mesh_.cellCentres()[cells[i]].x()*1000.0; scalar ccY = mesh_.cellCentres()[cells[i]].y()*1000.0; scalar Umax = someEquation; scalar Unorm = someOtherEquation; scalar Ux = Umax*Unorm; values[i] = Ux; values[i].y() = 0.0; values[i].z() = 0.0; } eqn.setValues(cells, values); #}; // Dummy entry. Make dependent on above to trigger recompilation code #{ $codeInclude $codeCorrect $codeAddSup $codeSetValue #}; } // sourceTimeCoeffs velocitySourceCoeffs { // Dummy entry } } Thanks! Last edited by DSMC123; September 12, 2018 at 07:25. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error message: Insufficient Catalogue Size | Paresh Jain | CFX | 33 | August 16, 2024 06:09 |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 17:38 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Momentum source coefficient, cylindrical coordinates, circumferential component? | polakse | CFX | 15 | January 18, 2016 03:40 |
UDF component in Cyliderical Velocity? | Hongchan Kim | FLUENT | 3 | April 24, 2001 13:20 |