|
[Sponsors] |
October 22, 2020, 19:07 |
vectorCodedSource problems
|
#1 |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Hi
I have the problem with vectorCodedSource; in fvOption file I'm modifying incompressible/simpleFoam/rotorDisk tutorial. The target is to have either polynomial or tabular velocity in the RotatingZone. Please let me know if there is a simpler way Right now I'm trying to put velocity in the y-direction that corresponds to the y coordinate of cell. It gives me not feasible values Thank you Code:
{ type vectorCodedSource; active true; selectionMode cellZone; cellZone rotatingZone; fields (U); name codedSource; codeAddSup #{ const Time& time = mesh().time(); const scalarField& V = mesh_.V(); vectorField& USource = eqn.source(); // const scalarField& cellx = mesh_.C().component(0) ; const scalarField& celly = mesh_.C().component(1) ; // const scalarField& cellz = mesh_.C().component(2) ; // Start time const scalar startTime = 20.0; if (time.value() > startTime) forAll(celly, i) { scalar v1 = 0 ; scalar v2 = celly[i] ; scalar v3 = 0 ; USource[i][0] +=celly[i]; //celly[i]; } #}; } |
|
May 31, 2022, 09:08 |
|
#2 | |
Member
Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 43
Rep Power: 6 |
Quote:
Hi, Did you manage to resolve this issue? |
||
December 11, 2022, 22:01 |
the cell volume is missed
|
#3 |
New Member
Haitham Osman
Join Date: Jan 2020
Posts: 6
Rep Power: 6 |
I hope your issue was solved.
If NOT, I think you should multiply your equation by the cell volume. So, the equation should be like USource[i][0] +=celly[i] *V[i] Best wishes |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 12:12 |
[mesh manipulation] Problems with rotational cyclic boundaries | TReviol | OpenFOAM Meshing & Mesh Conversion | 8 | July 11, 2014 04:45 |
[ICEM] Flow channel meshing problems | StefanG | ANSYS Meshing & Geometry | 19 | May 15, 2012 07:44 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 06:44 |
Help required to solve Hydraulic related problems | aero | CFX | 0 | October 30, 2006 12:00 |