|
[Sponsors] |
snippet for a custom variable which is a product of two variables |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 30, 2016, 20:33 |
snippet for a custom variable which is a product of two variables
|
#1 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Dear Fellows
In my solver, by solving transport equations, I am achieving which is bulk charge density and which is velocity. I have added the following snippet in my createFields.H file: I want to find the distribution of from my code in which is the component of velocity in x direction. I have added the following snippet in my createFields.H file: Code:
volScalarField Ux ( IOobject ( "Ux", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), U.component(vector::X) ); volScalarField rhoE ( IOobject ( "rhoE", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh // dimensionedScalar("rhoE", dimensionSet(0, -3, 1, 0, 0, 1, 0), scalar(0.0)) ); volScalarField rhoEUx ( IOobject ( "rhoEUx", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), rhoE*Ux ); Code:
rhoEUx = rhoE * Ux; // volVectorField temptemp = rhoE*E; // volVectorField temptemp = 3e-06*(fvc::grad(UeExt)); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) - tmp2 - tmp1 ); UEqn.relax(); However if I use calculator filter in paraview, I would be able to create the distribution of . Does any body know, where did I make mistake? Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Integrating a custom variable over a line | babakflame | ParaView | 9 | May 19, 2019 19:45 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 09:14 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 04:35 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 04:27 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |