Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

header in txt file imported to COMSOL

Please login with a confirmed email address before reporting spam

hi,

I've got a 2D geometry and want to describe it with a parameter changing only in Y direction (vertically). I have a txt file which I imported creating an interpolation function, but how can I 'tell' COMSOL that this property is changing in only one dimension and which one is it? I guess the answer is in appropriate use of header (which would also help me defining usits for this property), but I cannot find a clear enough and working example of it.
is it % y[m] C[mol/m^3]? it does not work though. (the file is sectionwise)

thank you in advance
Mike

1 Reply Last Post 13 mar 2011, 06:16 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 mar 2011, 06:16 GMT-4
Hi

if I catch your right, you have a rectangle in 2D (x,y) and you want to impose, a value that changes along "Y".

If so, then for simplicity let us consider a voltage of "V1" on the top edge, and V0 on the bottom edge, the voltage change between the two electrodes is then simply

V = (V1-V0)*(y-Y0)/Distance

where Y0 is the "Y" value of the lower electrode and Distance is the distance between the two electrodes

Try it out with an initial condition and just solve for initial conditions (i.e. v4 select solver dependent variables right click solve to here)

If you have a home brewed V field, then make an interpolation function and call it instead of the formula above
--
Good luck
Ivar
Hi if I catch your right, you have a rectangle in 2D (x,y) and you want to impose, a value that changes along "Y". If so, then for simplicity let us consider a voltage of "V1" on the top edge, and V0 on the bottom edge, the voltage change between the two electrodes is then simply V = (V1-V0)*(y-Y0)/Distance where Y0 is the "Y" value of the lower electrode and Distance is the distance between the two electrodes Try it out with an initial condition and just solve for initial conditions (i.e. v4 select solver dependent variables right click solve to here) If you have a home brewed V field, then make an interpolation function and call it instead of the formula above -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.